-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
kvclient: add a btree to store buffered writes #139963
Conversation
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
0a952af
to
003dc50
Compare
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. I did not review the generated code.
003dc50
to
132a314
Compare
This patch introduces a btree to buffer writes on the txnWriteBuffer interceptor. References cockroachdb#139053 Release note: None
132a314
to
aa0efb6
Compare
TFTR! I had to do some hacky stuff to calm down static check, but that should go away once the next PR is in. bors r=stevendanna |
140001: kvclient: buffer blind writes on the client r=stevendanna,yuzefovich a=arulajmani First commit from #139963. ---- This patch adds logic to buffer blind writes (Puts or Deletes) in the txnWriteBuffer. Interceptors and layers above remain oblivious to the txnWriteBuffer's decision to buffer any writes. All buffered writes are flushed at commit time, in the same batch as the EndTxn request. This flushing at commit time is also hidden from interceptors above the txnWriteBuffer by stripping responses on the return path. The code structure here allows us to split a batch request into different bits, where some portion is evaluated locally and the rest is sent to the KV layer. It's written with a future where we split read-write requests (e.g. CPuts) into separte read/write halves, where the read portion needs to be evaluated at the leaseholder, but the write needs to be buffered. Closes #139053 Release note: None Co-authored-by: Arul Ajmani <[email protected]>
This patch introduces a btree to buffer writes on the txnWriteBuffer interceptor.
References #139053
Release note: None