Skip to content

feature : support rocksdb in filemode - #8149

Open
LegendPei wants to merge 30 commits into
apache:2.xfrom
LegendPei:feat/support-rocksdb-in-filemode
Open

feature : support rocksdb in filemode#8149
LegendPei wants to merge 30 commits into
apache:2.xfrom
LegendPei:feat/support-rocksdb-in-filemode

Conversation

@LegendPei

@LegendPei LegendPei commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Ⅰ. 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

LegendPei added 26 commits June 3, 2026 17:03
@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.16667% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.25%. Comparing base (dbea185) to head (aa525d4).

Files with missing lines Patch % Lines
...ot/autoconfigure/loader/SeataPropertiesLoader.java 12.50% 7 Missing ⚠️
...erver/console/entity/param/GlobalSessionParam.java 0.00% 4 Missing ⚠️
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              
Files with missing lines Coverage Δ
...ava/org/apache/seata/common/ConfigurationKeys.java 0.00% <ø> (ø)
...n/java/org/apache/seata/common/store/LockMode.java 94.11% <100.00%> (+0.36%) ⬆️
...ta/spring/boot/autoconfigure/StarterConstants.java 100.00% <ø> (ø)
...configure/SeataServerEnvironmentPostProcessor.java 100.00% <100.00%> (ø)
...e/properties/server/store/StoreFileProperties.java 100.00% <100.00%> (ø)
...erver/console/entity/param/GlobalSessionParam.java 0.00% <0.00%> (ø)
...ot/autoconfigure/loader/SeataPropertiesLoader.java 54.54% <12.50%> (-8.62%) ⬇️

... and 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LegendPei
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support RocksDB storage engine in File mode

1 participant