tikv / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
120 stars 93 forks source link

Enrich write batch #379

Closed v01dstar closed 1 month ago

v01dstar commented 2 months ago

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.

ti-chi-bot[bot] commented 1 month ago

[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: - ~~[OWNERS](https://github.com/tikv/rocksdb/blob/8.10.tikv/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
ti-chi-bot[bot] commented 1 month ago

[LGTM Timeline notifier]

Timeline: