-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Inactive non-persistent subscriptions not purged #5759
Labels
Milestone
Comments
Thanks for the detailed reports @wmccarley . This is a feature that need to fix for non-persistent topics. This should be a direct fix that need following #1352 have done, mark this as help wanted. |
I will work on it |
sijie
pushed a commit
that referenced
this issue
Oct 5, 2020
Fixes #5759 ### Motivation unused subscriptions will never be cleared on non-persistent topics ### Modifications Add the `lastActive` attribute for non-persistent subscriptions. In the `checkInactiveSubscriptions` method of `NonPersistentTopic`, eligible subscriptions will be cleaned up ### Verifying this change org.apache.pulsar.client.api.NonDurableSubscriptionTest#testDeleteInactiveNonPersistentSubscription
wolfstudy
pushed a commit
that referenced
this issue
Oct 30, 2020
Fixes #5759 ### Motivation unused subscriptions will never be cleared on non-persistent topics ### Modifications Add the `lastActive` attribute for non-persistent subscriptions. In the `checkInactiveSubscriptions` method of `NonPersistentTopic`, eligible subscriptions will be cleaned up ### Verifying this change org.apache.pulsar.client.api.NonDurableSubscriptionTest#testDeleteInactiveNonPersistentSubscription (cherry picked from commit 6711b71)
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this issue
Nov 13, 2020
…he#8166) Fixes apache#5759 ### Motivation unused subscriptions will never be cleared on non-persistent topics ### Modifications Add the `lastActive` attribute for non-persistent subscriptions. In the `checkInactiveSubscriptions` method of `NonPersistentTopic`, eligible subscriptions will be cleaned up ### Verifying this change org.apache.pulsar.client.api.NonDurableSubscriptionTest#testDeleteInactiveNonPersistentSubscription
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have set up a cluster with brokers that only serve non-persistent topics. Furthermore, I have set the topic/subscription purge intervals/frequencies to low values to satisfy the use case I am focused on. However I am not seeing topics get cleaned up due to inactivity.
In the original pull request (1352) by @yush1ga that implemented the inactive subscription purge feature the checkInactiveSubscriptions method was not implemented for NonPersistent topics:
https://github.com/apache/pulsar/pull/1352/files#diff-48abd445bf0d38e83cc8966f765f6615
Isn't the side effect of this that unused subscriptions will never be cleared on non-persistent topics? In turn this prevents the broker from purging the topic as inactive if there are also no producers?
Is this correct?
My concern is that in an environment where I need lots of short-lived (read: ephemeral) non-persistent topics I will accumulate topic metadata as older topics are abandoned but never fully cleaned up...
Expected behavior
I would expect that the subscription inactivity and topic inactivity settings would apply to non-persistent topics as well.
The text was updated successfully, but these errors were encountered: