Skip to content

Commit 652fd16

Browse files
committed
fix: syncLeases error when using lease stealing
1 parent f2122da commit 652fd16

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

redis/redis-checkpoint.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,18 @@ func (checkpointer *RedisCheckpoint) syncLeases(shardStatus map[string]*par.Shar
310310
iter := checkpointer.svc.Scan(cursor, checkpointer.prefix+"*", 1).Iterator()
311311

312312
for iter.Next() {
313-
j := iter.Val()
313+
key := iter.Val()
314+
j, err := checkpointer.svc.Get(key).Result()
315+
316+
if err != nil { // just logging
317+
log.Errorf("syncLeases Get Error: %s, %s", err.Error(), key)
318+
continue
319+
}
314320

315321
cp, err := jsonToCheckpoint(j)
316322

317323
if err != nil { // just logging
318-
log.Errorf("syncLeases jsonToCheckpoint Error: %s", err.Error())
324+
log.Errorf("syncLeases jsonToCheckpoint Error: %s, %s", err.Error(), j)
319325
continue
320326
}
321327

0 commit comments

Comments
 (0)