Skip to content

[ISSUE #10195] Ensure RocksDB compatibility in slave-master synchronization#10196

Merged
lizhimins merged 1 commit intoapache:developfrom
gaoyf:gyf-20260324-fix-slave-sync-data-bug
Mar 24, 2026
Merged

[ISSUE #10195] Ensure RocksDB compatibility in slave-master synchronization#10196
lizhimins merged 1 commit intoapache:developfrom
gaoyf:gyf-20260324-fix-slave-sync-data-bug

Conversation

@gaoyf
Copy link
Copy Markdown
Contributor

@gaoyf gaoyf commented Mar 24, 2026

Which Issue(s) This PR Fixes

Brief Description

When enable rocksdb engine,slave can't sync all topics and subscription from master.
Because the below logic uses wrong DataVersion:
image

The returned to client's DataVersion is from rocksdb,but TopicConfigManager#subTopicConfigTable use the DataVersion from TopicConfigManager:
2
The two DataVersion are not equals!So beginIndex will be reseted to 0 every time.

How Did You Test This Change?

1 Use command to check the topic: ./mqadmin rocksDBConfigToJson -p ../data/config -t topics
2 Watch the slave's log:
r

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.83%. Comparing base (e100743) to head (a121b93).

Files with missing lines Patch % Lines
.../broker/subscription/SubscriptionGroupManager.java 0.00% 0 Missing and 1 partial ⚠️
...ache/rocketmq/broker/topic/TopicConfigManager.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10196      +/-   ##
=============================================
- Coverage      48.93%   48.83%   -0.11%     
+ Complexity     13384    13355      -29     
=============================================
  Files           1373     1373              
  Lines          99924    99924              
  Branches       12908    12908              
=============================================
- Hits           48898    48797     -101     
- Misses         45098    45178      +80     
- Partials        5928     5949      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lizhimins lizhimins changed the title Ensure RocksDB compatibility in slave-master synchronization. [ISSUE #10195] Ensure RocksDB compatibility in slave-master synchronization Mar 24, 2026
@lizhimins lizhimins merged commit 8d451f3 into apache:develop Mar 24, 2026
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.

[Bug] Slave can not sync all data from master when enable rocksdb engine

4 participants