Skip to content

[ISSUE #9666] Add accelerated startup recovery feature for RocksDB store with SYNC_FLUSH#9667

Merged
ltamber merged 4 commits intoapache:developfrom
RongtongJin:feature/accelerated-startup
Sep 9, 2025
Merged

[ISSUE #9666] Add accelerated startup recovery feature for RocksDB store with SYNC_FLUSH#9667
ltamber merged 4 commits intoapache:developfrom
RongtongJin:feature/accelerated-startup

Conversation

@RongtongJin
Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Fixes #9666

Brief Description

This PR implements an accelerated startup recovery feature that significantly reduces broker startup time when using RocksDB storage with SYNC_FLUSH configuration.

How Did You Test This Change?

Add accelerated startup recovery functionality when using RocksDB store with SYNC_FLUSH configuration:

- Add enableAcceleratedRecovery configuration option in MessageStoreConfig
- Implement accelerated recovery logic in CommitLog for both normal and abnormal recovery
- Add protective fallback mechanism to handle edge cases
- Improve isMappedFileMatchedRecover method for better robustness
- Add comprehensive unit tests for the accelerated recovery feature

This feature significantly reduces startup time when recovering from RocksDB-based storage
with synchronous flushing enabled, while maintaining data consistency and safety.
Remove AcceleratedRecoveryTest.java as the test implementation was not appropriate for the accelerated startup recovery feature.
Copy link
Copy Markdown
Contributor

@GenerousMan GenerousMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@fuyou001 fuyou001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ltamber ltamber merged commit 86e8ed6 into apache:develop Sep 9, 2025
10 of 11 checks passed
@RongtongJin RongtongJin added the ha label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Add accelerated startup recovery feature for RocksDB store with SYNC_FLUSH

4 participants