feature : support rocksdb in filemode - #8149
Open
LegendPei wants to merge 30 commits into
Open
Conversation
feature : rocksdb phase1 config and spi
Feat/rocksdb phase2 engine
Feat/rocksdb phase3 query index
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #8149 +/- ##
============================================
- Coverage 73.25% 73.25% -0.01%
- Complexity 1146 1148 +2
============================================
Files 1153 1153
Lines 42348 42368 +20
Branches 5061 5063 +2
============================================
+ Hits 31022 31035 +13
- Misses 8845 8852 +7
Partials 2481 2481
🚀 New features to boost your workflow:
|
LegendPei
marked this pull request as ready for review
August 20, 2026 14:19
Add production configuration controls, diagnostics, maintenance foundations, snapshot support, and benchmark coverage.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ⅰ. Describe what this PR did
This pull request adds an optional RocksDB storage engine within the existing File mode, without introducing a separate StoreMode. When not configured, the original FileStore will continue to be used. The RocksDB path will only be enabled when explicitly setting store.mode=file and store.file.engine=rocksdb.
The main content is as follows:
Add the mapping between the store.file.engine=file|rocksdb, RocksDB data directory, and Spring Boot configuration, and supplement the verification between LockMode.ROCKSDB and valid lock modes, prohibiting the use of different backends for session and lock.
Implement the RocksDB engine, column family, key/value codec, shared engine factory, transaction store manager, and the foundation for batch writing across column families.
Implement RocksDBSessionManager and RocksDBLockManager, persist global session, branch session, row lock, and lock branch index, and integrate SessionHolder startup and recovery paths.
Introduce a one-time migration process for logs in the old File mode to RocksDB, utilizing explicit migration status to handle retries and recoveries, rather than relying on the existence of a directory to determine migration completion.
Add query indexes for xid, transaction id, status, begin time, etc., and enable Console queries to reuse the index path, while maintaining the original query semantics for xid and transaction id.
Supplement unit tests and query benchmark harness for configuring routing, engine, codec, session, lock, migration, index, and Console query.
This PR primarily establishes the functional and operational baseline for RocksDB FileMode
Ⅱ. Does this pull request fix one issue?
fixes #8114
Ⅲ. Why don't you add test cases (unit test/integration test)?
Test coverage:
Configuration parsing, default compatibility, and fail-fast for illegal combinations of File engine and lock mode.
RocksDB key/value codec, engine startup and shutdown, column family, and batch read and write.
Add, delete, modify, query, and restart recovery of global/branch sessions.
row lock acquisition, conflict, status update, branch/global release, and stale index handling.
The initial execution, repeated execution, interruption status, and resumption of the file log migration.
Index queries for xid, transaction id, status, and begin time, as well as Console query semantics.
RocksDB parameter verification, diagnostics, checkpoint, basic verify, snapshot interface, and RangeDelete have equivalent semantics.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
plan: #8126