[fix][broker]Do not trigger topic GC if replication is still active#25915
[fix][broker]Do not trigger topic GC if replication is still active#25915poorbarcode wants to merge 10 commits into
Conversation
codelipenghui
left a comment
There was a problem hiding this comment.
@poorbarcode I'm thinking another solution
- Close the replicator producer if the producer is idle for a while (e.g. 10 mins)
- Check all the producers for detecting the inactive topic (now it's more complicated to skip the replicator producer)
- Only delete the inactive topic if there is no producers (including the replicator producer)
Now, your solution added 7 days delay for inactive topic deletion if geo-replication enable. But if there is no messages from last 7 days, the issue can still happen, right?
I agree with this concern. A replicated topic can be quiet for longer than the threshold while the replication relationship is still valid. Using |
|
@codelipenghui @void-ptr974 Changed the solution as @codelipenghui suggested, please review again |
f4194c9 to
0c2ce19
Compare
|
@codelipenghui @lhotari @void-ptr974 Please review the PR again. I have changed the solution:
|
Motivation
Replication is stuck due to the Topic GC
primary clusterandbackup clusterprimary cluster: Publishing messages intoprimary clusterbackup cluster: No consumer/producer is registered.backup cluster: Check topic GCremote producerbackup cluster: the topic GC progress is waiting for the remote-producer to be disconnected.backup cluster: backlog increases because the replicator was closedModifications
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes