-
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
mvcc/kvstore: Optimize compaction #11150
Conversation
Remove auth validation loop in v3_server.raftRequest(). Re-validation when error ErrAuthOldRevision occurs should be handled on client side.
…ompact take too long and blocks other requests
Could you elaborate how this change helps? This is still the same amount of work but is done at a different time? Do you have test data showing the improvement? Thanks! Also if we move index compaction to the scheduled FIFO, we need to adjust the metric "indexCompactionPauseMs" accordingly. |
Yes, Just let index compact do in another goroutine。 first,I put 1000000 or more key-value: then,i do compact use: when the compact is going on, the other new put request is blocked, and Completion delay > 1 sec. The reason is the index compact took too time to assign map[],when the tree is big enough。 Move index compaction to the scheduled FIFO, let the compaction don't block the new request。 TEST :(put 5 key,when compacting) After Modification: Response time histogram: |
bill-of-materials was fixed for module aware 'go list' as part of coreos/license-bill-of-materials#17 So can re enable bom tests fixes etcd-io#11132
Thanks for doing benchmark testing! With this change, when the actual index compaction happens later, it will still block other requests such as put request. Is my understanding correct? |
Remotes is not a valid git command. Also, set the environmental variable correctly.
With this modification, compaction will no longer block other request messages。;) |
hack: fix cherrypick instruction
Sorry I don't quite understand. This modification basically postponed the compaction work in index tree to a later time. So I can understand the compaction request does not block other requests immediately. But later when the actual compaction work happens, it has the same effect on other requests, right? |
Hi, |
travis: re-enable bom tests
integration: fix bug in for loop, make it break properly
Thanks I see your point. My previous thinking was that the index compaction does hold a write lock most of the time during its execution, so it blocks other request (which also need read or write the same index tree) anyway. Another potential concern is the function returns w/o actually doing the compaction work in index tree (because it is just scheduled). So depends on when the index compaction happens, the returned "keep" could be different, meaning the keys to be deleted in the data base is different. I don't think there are any correctness concerns, but it makes consistency checking among nodes more difficult. - not completely sure about what I said here, need some time to read and think through. |
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Since NewMutex will append a slash to pfx, there is no need to append a slash beforehand.
clientv3/concurrency: remove the unneeded slash
Update the code of conduct. Remove notice file.
*: update project code of conduct
clientv3: remove the redundant CancelFunc invocation
test(functional): remove unknown field Etcd.Debug
Add slack chat contact.
*: add slack contact
Added link and removed wrongly copied text
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
scripts/release: list GPG key only when tagging is needed
I think my previous statement was wrong. "keep" does not depend on key modifications after compaction rev. So this should be safe. |
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.
LGTM
Oh actually we also need to adjust the calculation of metrics |
We can remove this step in that case. It will be timed with the backend together as a whole scheduled job. |
fileutil, src: format errors
@shenjiangc Could you please rebase to current master? And then:
|
Disable TestV3AuthOldRevConcurrent for now. See etcd-io#10468 (comment)
etcdserver: remove infinite loop for auth in raftRequest
To prevent the purge file loop from accidentally acquiring the file lock and remove the files during server shutdowm.
etcdserver: wait purge file loop to finish during shutdown
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
clientv3: fix retry/streamer error message
lease:Add Unlock before break in loop
mvcc: Add Unlock before panic to prevent double lock
etcdserver: fix a bug which append object to a new allocated sized slice
…ompact take too long and blocks other requests
I made some mistacks, the new pull request is #11330 , Please take a look。 |
mvcc/kvstore: Optimize compaction, slove conflict for #11150
mvcc/kvstore: Optimize compaction
when the number of key-value index is greater than one million, compact take too long and blocks other requests.
Move the “kvindex.Compact” to “fifoSched.Schedule” func