-
Notifications
You must be signed in to change notification settings - Fork 95
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
Enrich write batch #379
Enrich write batch #379
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.
LGTM
I want to use format of rocksdb::WriteBatch to encode key-value pairs of TiKV, and I need an more effective method to copy data from Entry to WriteBatch directly so that I could avoid CPU cost of decode. Signed-off-by: Little-Wallace <[email protected]> Signed-off-by: tabokie <[email protected]> Signed-off-by: Yang Zhang <[email protected]>
321c3b0
to
4b571c4
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Connor1996, glorv, LykxSassinator The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
This is a cherry-pick of #177
Adding
WriteBatch::Iterator
andWriteBatchInternal:: AppendContents()
.WriteBatchInternal::AppendContents()
is used by TiKV to efficiently merge multiple write batches into a larger batch, thereby reducing overhead. This operation is particularly useful for avoiding unnecessary memory copies or decoding of data.WriteBatch::Iterator
is not being directly used by TiKV. But it is still kept.