-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clientv3: fix sync base #5883
clientv3: fix sync base #5883
Conversation
610d947
to
720406e
Compare
I am not sure I can understand this. Why should the prefix change per batch? |
ctx := context.TODO() | ||
|
||
for i := 0; i < 2000; i++ { | ||
if _, err := cli.Put(ctx, fmt.Sprintf("test%d", i), "test"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test does not work without this patch?
ctx := context.TODO() | ||
|
||
for i := 0; i < 2000; i++ { | ||
if _, err := cli.Put(ctx, fmt.Sprintf("test%d", i), "test"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably we need to spin up a bunch of go-routines (50?) to finish the put. Sync put would be slow, each would require a fsync (>10ms on hdd).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok,I will fix it。
It is not correct to use WithPrefix. Range end will change in every internal batch.
@westhood Thanks. lgtm. |
It is not correct to use WithPrefix. Range end will change in every
batch.