Skip to content

refactor(file): introduce pluggable file store runtime - #8217

Open
LegendPei wants to merge 3 commits into
apache:feature_rocksdb_filemodefrom
LegendPei:feat/rocksdb-file-spi
Open

refactor(file): introduce pluggable file store runtime#8217
LegendPei wants to merge 3 commits into
apache:feature_rocksdb_filemodefrom
LegendPei:feat/rocksdb-file-spi

Conversation

@LegendPei

Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR did

This PR introduces a pluggable runtime abstraction for Seata FileMode storage while preserving the existing file-based implementation as the default provider.

The main changes are:

  1. Introduce FileStoreProvider and FileStoreRuntime abstractions for FileMode storage.
  2. Add FileStoreProviderFactory to select the provider through store.file.engine.
  3. Move the existing file session and lock implementations behind DefaultFileStoreProvider.
  4. Introduce FileLockStore and make FileLockManager delegate lock operations to the selected store implementation.
  5. Let SessionHolder manage the complete FileMode runtime lifecycle:
    • open runtime;
    • install the lock manager;
    • recover sessions;
    • start background services;
    • roll back partially initialized resources on startup failure;
    • close resources in reverse order.
  6. Make LockerManagerFactory support typed FileMode lock-manager installation and reject FileMode access before its runtime is ready.
  7. Remove eager caching of LockManager and coordinator instances from session, transaction and Console backend components.
  8. Keep store.file.engine=default as the default configuration so the original FileMode implementation remains available through the new abstraction.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@LegendPei
LegendPei marked this pull request as ready for review September 5, 2026 09:17
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.

1 participant