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

[Broker] Remove subscription when closing Reader on non-persistent topics #11731

Merged

Conversation

gaoran10
Copy link
Contributor

Motivation

Currently, the subscription will not be removed when closing the non-persistent topic reader.

Modifications

Add a new field isDurable in NonPersistentSubscription, if the field is false the non-persistent subscription should be removed when closing the subscription(Such as a Reader subscription), or the subscription will be retained(Such as a Consumer subscription).

Verifying this change

Add a new unit test to verify the reader subscription could be removed.

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

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

For committer

For this PR, do we need to update docs?

  • If no, label this PR with the no-need-doc label and explain why.

@gaoran10 gaoran10 added the doc-not-needed Your PR changes do not impact docs label Aug 20, 2021
@gaoran10 gaoran10 self-assigned this Aug 20, 2021
@gaoran10 gaoran10 changed the title [Broker] Remove the subscription when closing Reader [Broker] Remove the Reader subscription when closing Reader Aug 20, 2021
@merlimat merlimat added this to the 2.9.0 milestone Aug 20, 2021
@merlimat merlimat changed the title [Broker] Remove the Reader subscription when closing Reader [Broker] Remove subscription when closing Reader on non-persistent topics Aug 20, 2021
@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Aug 20, 2021
@merlimat merlimat merged commit 5ac38f1 into apache:master Aug 20, 2021
@gaoran10 gaoran10 deleted the gaoran/remove-reader-sub-non-durable-topic branch August 23, 2021 01:04
hangc0276 pushed a commit that referenced this pull request Aug 25, 2021
…pics (#11731)

* Remove the subscription from the topic when closing Reader subscription.

* remove useless code

(cherry picked from commit 5ac38f1)
@hangc0276 hangc0276 added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Aug 25, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…pics (apache#11731)

* Remove the subscription from the topic when closing Reader subscription.

* remove useless code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants