Commit a14ba36
committed
Fix topic deletion issue in master-slave clusters
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 #10030 and is related to issue #9984.
Changes:
- syncTopicConfig(): Move topicConfigManager.deleteTopicConfig() inside if block
- syncSubscriptionGroupConfig(): Move subscriptionGroupManager.deleteSubscriptionGroupConfig() inside if block1 parent 236ede2 commit a14ba36
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | | - | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | | - | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
0 commit comments