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

Apply Titan related changes #388

Closed v01dstar closed 1 month ago

v01dstar commented 1 month ago
  1. Making Statistics extensible, this is a cherry-pick of 7c6dcaa496564ec49cb1a135cfbf9e0a22cb31c5. In addition to the original PR, this new one also instantiate StatisticsImpl template at the end of statistics.cc to resolve visibility issues in tests
  2. Add copy constructor to ColumnFamilyHandle, this is a prerequisite of https://github.com/tikv/titan/pull/298
  3. Reassign ValueType::0x11 to kTypeTitanBlobIndex, and create a new kTypeBlobIndex (RocksDB native blob index) at 0x18, so that Titan blob index can be distinguished from RocksDB's native blob index, thus won't get mistakenly parsed by RocksDB and cause panic. Existing Titan instances don't need to migrate.

In the future, we need to merge this with #390 , attaching #390 description here:

Maintainer's note: When upgrading RocksDB in the future, we need to check all the occurrence of kTypeBlobIndex and kTypeColumnFamilyBlobIndex (for blob indices in non-default cf) in RocksDB's repo, and add kTypeTitanBlobIndex and kTypeTitanColumnFamilyBlobIndex accordingly. Anywhere kTypeColumnFamilyBlobIndex exists, we need to add kTypeTitanColumnFamilyBlobIndex, where kTypeBlobIndex exists, we need to add kTypeTitanBlobIndex.

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:

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

New changes are detected. LGTM label has been removed.