Skip to content

Commit

Permalink
fix: bug with repeat key (#2306)
Browse files Browse the repository at this point in the history
* fix bug with repeat key

Signed-off-by: sjcsjc123 <1401189096@qq.com>
  • Loading branch information
sjcsjc123 committed Jan 15, 2024
1 parent 8bbfe29 commit 7c689df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/pika_keys_analysis/pika.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func SolveSingleClient(client *redis.Client, ctx context.Context, wg *sync.WaitG
}
}
}(cursor)
cursor += int64(ScanSize)
start = true
keys, _, err := client.Scan(ctx, uint64(cursor), "*", 1).Result()
if err != nil {
_ = fmt.Errorf("scan error: %s", err)
Expand All @@ -111,8 +113,6 @@ func SolveSingleClient(client *redis.Client, ctx context.Context, wg *sync.WaitG
break
}
}
cursor += int64(ScanSize)
start = true
}
fmt.Printf("Current client %s done, waiting for task to finish\n", client)
wgClient.Wait()
Expand Down

0 comments on commit 7c689df

Please sign in to comment.