Skip to content

Conversation

RongtongJin
Copy link
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
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
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
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.

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