Fix topic deletion issue in master-slave clusters#10037
Closed
FaisalMisbah23 wants to merge 2 commits intoapache:developfrom
Closed
Fix topic deletion issue in master-slave clusters#10037FaisalMisbah23 wants to merge 2 commits intoapache:developfrom
FaisalMisbah23 wants to merge 2 commits intoapache:developfrom
Conversation
Issue: Topics cannot be permanently deleted in master-slave RocketMQ clusters because slave brokers incorrectly delete all topics during synchronization. Root Cause: In SlaveSynchronize.java, the deleteTopicConfig() call was placed outside the conditional check, causing ALL topics to be deleted from slaves during sync, not just the ones missing from master's config. Fix: Move deleteTopicConfig() and deleteSubscriptionGroupConfig() calls inside the conditional blocks so they only execute for topics/subscription groups that should actually be deleted. This addresses GitHub issue apache#10030 and is related to issue apache#9984. Changes: - syncTopicConfig(): Move topicConfigManager.deleteTopicConfig() inside if block - syncSubscriptionGroupConfig(): Move subscriptionGroupManager.deleteSubscriptionGroupConfig() inside if block
7d5ae9b to
ddb971e
Compare
Contributor
|
It seems that this PR duplicates this issue: #9996. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes
Fixes #10030
Brief Description
Fix topic deletion issue in master-slave RocketMQ clusters. The problem was that slave brokers were deleting all topics during synchronization instead of only the missing ones. This was caused by
deleteTopicConfig()anddeleteSubscriptionGroupConfig()calls being placed outside the conditional checks inSlaveSynchronize.java.How Did You Test This Change?