Enrich write batch
This is a cherry-pick of https://github.com/tikv/rocksdb/pull/177
Adding WriteBatch::Iterator and WriteBatchInternal:: 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.
[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
- ~~OWNERS~~ [Connor1996,LykxSassinator,glorv]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
[LGTM Timeline notifier]
Timeline:
2024-09-26 08:01:18.42983109 +0000 UTC m=+1725748.170255028: :ballot_box_with_check: agreed by Connor1996.2024-09-27 03:10:53.828916709 +0000 UTC m=+1794723.569340648: :ballot_box_with_check: agreed by LykxSassinator.2024-09-27 06:32:38.463294094 +0000 UTC m=+1806828.203718053: :heavy_multiplication_x::repeat: reset by v01dstar.2024-09-27 07:07:52.860935664 +0000 UTC m=+1808942.601359615: :ballot_box_with_check: agreed by LykxSassinator.2024-09-27 07:11:21.471349686 +0000 UTC m=+1809151.211773624: :ballot_box_with_check: agreed by glorv.