-
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
backend: set seq flag for each bucket buffer #12568
Conversation
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.
Nice. Thank you.
Please retrigger tests and I will merge when green.
@@ -37,11 +37,12 @@ func (txb *txBuffer) reset() { | |||
// txWriteBuffer buffers writes of pending updates that have not yet committed. | |||
type txWriteBuffer struct { | |||
txBuffer | |||
seq bool | |||
seq map[string]bool |
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.
Please comment about semantic of this field (what's the key and what the value represents).
./scripts/fix.sh should fix the formatting problem (superfluous empty line). |
I applied my suggestions on top of the PR - so from my perspective its good for merge. @wilsonwang371 - could you, please, take a look as its related to code you are actively working on. |
The branch tests a green: The PR was pushed before the reorg - so the tests results are not shown on the PR-level |
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 looks good to me.
Btw, shall we change the variable name to make it more clear with the new changes? |
Migrated to: #12986 |
This PR solves two problems:
seq
flag totrue
when resetting the wholetxWriteBuffer
, otherwise thewriteback
method always sort the buffer onceseq
set tofalse
seq
flag to reduce sort times, as most of the data is stored in thekey
bucket, which grows in sequence.