Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][broker]Delete subscription and disconnect replicators after topic migration #21029

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

vineeth1995
Copy link
Contributor

@vineeth1995 vineeth1995 commented Aug 18, 2023

Motivation

Right now after we mark the topic migrated, replicators do not get disconnected from blue cluster and subscriptions are not deleted even after the backlog is drained and all consumers are disconnected. This pr takes care of this by asynchronously disconnecting replicators and deleting subscriptions once the backlog is drained and all consumers are disconnected when checkClusterMigration API is called.

Modifications

Replicators without backlog are disconnected and subscriptions without consumers are deleted and eventually topic is garbage collected in the blue cluster.

Call checkAndDisconnectReplicators() and checkAndUnsubscribeSubscriptions() in checkClusterMigration() periodic job.

Verifying this change

This change added tests and can be verified as follows:

Added unit tests to verify the change

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 18, 2023
@vineeth1995
Copy link
Contributor Author

/pulsarbot run-failure-checks

2 similar comments
@vineeth1995
Copy link
Contributor Author

/pulsarbot run-failure-checks

@vineeth1995
Copy link
Contributor Author

/pulsarbot run-failure-checks

Copy link
Contributor

@rdhabalia rdhabalia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rdhabalia rdhabalia merged commit c1b0454 into apache:master Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants