-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[ISSUE 8159]Add a new state for namespace-level TTL #8178
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
Oct 2, 2020
sijie
approved these changes
Oct 2, 2020
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Oct 3, 2020
Fixes apache#8159 ### Motivation When the namespace-level TTL is set to 0, it means 2 states: 1) TTL check is disabled 2) The namespace-level setting does not exist, return to the broker-level setting These two states are in conflict. We don't know if it is disabled or using broker-level configuration. ### Modifications We should set a state separately for the case where the namespace-level configuration does not exist. The TTL of the namespace-level can be set to null, which means it does not exist. It is consistent with topic-level TTL. ### Verifying this change
codelipenghui
pushed a commit
that referenced
this pull request
Oct 7, 2020
Fixes #8159 When the namespace-level TTL is set to 0, it means 2 states: 1) TTL check is disabled 2) The namespace-level setting does not exist, return to the broker-level setting These two states are in conflict. We don't know if it is disabled or using broker-level configuration. We should set a state separately for the case where the namespace-level configuration does not exist. The TTL of the namespace-level can be set to null, which means it does not exist. It is consistent with topic-level TTL. (cherry picked from commit aa7383e)
This PR has cherry-picked to branch-2.6. |
wolfstudy
added a commit
that referenced
this pull request
Oct 30, 2020
This reverts commit e2973f6.
wolfstudy
pushed a commit
that referenced
this pull request
Oct 30, 2020
Fixes #8159 When the namespace-level TTL is set to 0, it means 2 states: 1) TTL check is disabled 2) The namespace-level setting does not exist, return to the broker-level setting These two states are in conflict. We don't know if it is disabled or using broker-level configuration. We should set a state separately for the case where the namespace-level configuration does not exist. The TTL of the namespace-level can be set to null, which means it does not exist. It is consistent with topic-level TTL. (cherry picked from commit aa7383e) (cherry picked from commit e2973f6)
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Nov 13, 2020
Fixes apache#8159 ### Motivation When the namespace-level TTL is set to 0, it means 2 states: 1) TTL check is disabled 2) The namespace-level setting does not exist, return to the broker-level setting These two states are in conflict. We don't know if it is disabled or using broker-level configuration. ### Modifications We should set a state separately for the case where the namespace-level configuration does not exist. The TTL of the namespace-level can be set to null, which means it does not exist. It is consistent with topic-level TTL. ### Verifying this change
codelipenghui
pushed a commit
that referenced
this pull request
Jul 9, 2021
### Motivation If the subscription expiration time is set to a value greater than 0 at the broker level, setting 0 at the namespace level will not disable automatic subscription deletion. For example, suppose `subscriptionExpirationTimeMinutes=5` is written in `broker.conf`. This means that subscriptions to which no consumer is connected will be automatically deleted in 5 minutes. Now, suppose a user runs the following command to disable automatic subscription deletion in the namespace `tenant/ns`. ```sh $ ./bin/pulsar-admin namespaces set-subscription-expiration-time -t 0 tenant/ns ``` However, subscriptions in namespace `tenant/ns` will actually be deleted in 5 minutes like any other namespace. ### Modifications Change the type of `subscription_expiration_time_minutes` in the namespace policies from `int` to `java.lang.Integer` so that it can be set to null. If `subscription_expiration_time_minutes` is 0, automatic subscription deletion is disabled. If it is null, the broker-level setting is used. This fix is similar to #8178.
codelipenghui
pushed a commit
that referenced
this pull request
Jul 14, 2021
### Motivation If the subscription expiration time is set to a value greater than 0 at the broker level, setting 0 at the namespace level will not disable automatic subscription deletion. For example, suppose `subscriptionExpirationTimeMinutes=5` is written in `broker.conf`. This means that subscriptions to which no consumer is connected will be automatically deleted in 5 minutes. Now, suppose a user runs the following command to disable automatic subscription deletion in the namespace `tenant/ns`. ```sh $ ./bin/pulsar-admin namespaces set-subscription-expiration-time -t 0 tenant/ns ``` However, subscriptions in namespace `tenant/ns` will actually be deleted in 5 minutes like any other namespace. ### Modifications Change the type of `subscription_expiration_time_minutes` in the namespace policies from `int` to `java.lang.Integer` so that it can be set to null. If `subscription_expiration_time_minutes` is 0, automatic subscription deletion is disabled. If it is null, the broker-level setting is used. This fix is similar to #8178. (cherry picked from commit 406ef73)
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this pull request
Mar 18, 2022
### Motivation If the subscription expiration time is set to a value greater than 0 at the broker level, setting 0 at the namespace level will not disable automatic subscription deletion. For example, suppose `subscriptionExpirationTimeMinutes=5` is written in `broker.conf`. This means that subscriptions to which no consumer is connected will be automatically deleted in 5 minutes. Now, suppose a user runs the following command to disable automatic subscription deletion in the namespace `tenant/ns`. ```sh $ ./bin/pulsar-admin namespaces set-subscription-expiration-time -t 0 tenant/ns ``` However, subscriptions in namespace `tenant/ns` will actually be deleted in 5 minutes like any other namespace. ### Modifications Change the type of `subscription_expiration_time_minutes` in the namespace policies from `int` to `java.lang.Integer` so that it can be set to null. If `subscription_expiration_time_minutes` is 0, automatic subscription deletion is disabled. If it is null, the broker-level setting is used. This fix is similar to apache#8178.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8159
Motivation
When the namespace-level TTL is set to 0, it means 2 states:
These two states are in conflict. We don't know if it is disabled or using broker-level configuration.
Modifications
We should set a state separately for the case where the namespace-level configuration does not exist.
The TTL of the namespace-level can be set to null, which means it does not exist. It is consistent with topic-level TTL.
Verifying this change