Skip to content

[broker] Add replicated check to checkInactiveSubscriptions. #8066

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

Conversation

shustsud
Copy link
Contributor

@shustsud shustsud commented Sep 15, 2020

Motivation

After replicated subscription is deleted by checkInactiveSubscriptions, it will be recreated. (That is repeated.)

Replicated subscriptions are created with receiveSubscriptionUpdated.
In this case, position becomes latest position.

topic.createSubscription(update.getSubscriptionName(),
InitialPosition.Latest, true /* replicateSubscriptionState */);

I think replicated subscription should be excluded from automatic deletion.

Modifications

  • Fixed PersistentTopic.
  • Fixed PersistentTopicTest.

Verifying this change

  • Make sure that the change passes the CI checks.

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

  • 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

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

* Fixed PersistentTopic.
* Fixed PersistentTopicTest.
@nkurihar nkurihar added area/broker type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Sep 15, 2020
@nkurihar nkurihar added this to the 2.7.0 milestone Sep 15, 2020
@nkurihar
Copy link
Contributor

/pulsarbot run-failure-checks

@shustsud
Copy link
Contributor Author

/pulsarbot run-failure-checks

5 similar comments
@shustsud
Copy link
Contributor Author

/pulsarbot run-failure-checks

@shustsud
Copy link
Contributor Author

/pulsarbot run-failure-checks

@shustsud
Copy link
Contributor Author

/pulsarbot run-failure-checks

@shustsud
Copy link
Contributor Author

/pulsarbot run-failure-checks

@shustsud
Copy link
Contributor Author

/pulsarbot run-failure-checks

Copy link
Contributor

@hrsakai hrsakai left a comment

Choose a reason for hiding this comment

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

LGTM

@sijie sijie merged commit 5d31568 into apache:master Sep 21, 2020
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Oct 3, 2020
### Motivation

After replicated subscription is deleted by checkInactiveSubscriptions, it will be recreated. (That is repeated.)

Replicated subscriptions are created with receiveSubscriptionUpdated.
In this case, position becomes latest position.
 [https://github.com/apache/pulsar/blob/757824f88c06feb97968af6f5cdd7ccbea5ac666/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java#L182-L183](https://github.com/apache/pulsar/blob/757824f88c06feb97968af6f5cdd7ccbea5ac666/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java#L182-L183)

I think replicated subscription should be excluded from automatic deletion.

### Modifications

* Fixed PersistentTopic.
* Fixed PersistentTopicTest.
wolfstudy pushed a commit that referenced this pull request Oct 30, 2020
### Motivation

After replicated subscription is deleted by checkInactiveSubscriptions, it will be recreated. (That is repeated.)

Replicated subscriptions are created with receiveSubscriptionUpdated.
In this case, position becomes latest position.
 [https://github.com/apache/pulsar/blob/757824f88c06feb97968af6f5cdd7ccbea5ac666/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java#L182-L183](https://github.com/apache/pulsar/blob/757824f88c06feb97968af6f5cdd7ccbea5ac666/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java#L182-L183)

I think replicated subscription should be excluded from automatic deletion.

### Modifications

* Fixed PersistentTopic.
* Fixed PersistentTopicTest.

(cherry picked from commit 5d31568)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker release/2.6.2 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants