Skip to content

Commit a473d0d

Browse files
committed
created some reader and writers, but can't reproduce out of order error
1 parent 64197ca commit a473d0d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/reader/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func main() {
4040
logger.Get().Error("err calling hGetAll", zap.Error(err))
4141
}
4242
}
43+
logger.Get().Info("done")
4344
}()
4445
}
4546

cmd/writer/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ func main() {
4040
}
4141

4242
for i := 0; i < 1000000; i++ {
43-
hSetExpire(ctx, time.Second*1, client, fmt.Sprintf("hello:%d", i), cols, data, time.Hour*24)
43+
err := hSetExpire(ctx, time.Second*1, client, fmt.Sprintf("hello:%d", i), cols, data, time.Hour*24)
44+
if err != nil {
45+
logger.Get().Error("unable to hSetExpire", zap.Error(err))
46+
}
4447
if i%10000 == 0 {
4548
logger.Get().Info("inserted", zap.Int("num", i))
4649
}

0 commit comments

Comments
 (0)