[Issue 2689] Support set backlog quota on topic level. - #7646
Merged
codelipenghui merged 9 commits intoJul 31, 2020
Conversation
codelipenghui
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, just left some minor comments.
Comment on lines
+2081
to
+2094
| private boolean checkQuotas(BacklogQuota quota, RetentionPolicies retention) { | ||
| if (retention==null||retention.getRetentionSizeInMB() == 0 || | ||
| retention.getRetentionSizeInMB() == -1) { | ||
| return true; | ||
| } | ||
| if (quota == null) { | ||
| quota = pulsar().getBrokerService().getBacklogQuotaManager().getDefaultQuota(); | ||
| } | ||
| if (quota.getLimit() >= ( retention.getRetentionSizeInMB() * 1024 * 1024)) { | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Should keep consistent with checkQuotas in the NamespacesBase, And you can move this method to AdminResource so that you can use it both in the NamespacesBase and PersistentTopicsBase
Contributor
Author
There was a problem hiding this comment.
Ok, I extracted it.
Contributor
|
/pulsarbot run-failure-checks |
3 similar comments
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
|
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
Jul 27, 2020
… with the namespace
jianyun8023
force-pushed
the
topic-policy-backlog-quota
branch
from
July 28, 2020 01:37
c705b50 to
3dc2dab
Compare
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
Author
|
/pulsarbot run-failure-checks |
1 similar comment
Contributor
Author
|
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
Jul 31, 2020
16 tasks
This was referenced Aug 3, 2020
Closed
13 tasks
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
### Motivation Support set backlog quota on topic level. Based on the system topic function, refer to @codelipenghui topic-level backlog quota based on zk implementation ###Modifications Support get-backlog-quotas on topic level. Support set-backlog-quota on topic level. Support remove-backlog-quota on topic level.
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Sep 5, 2020
### Motivation Support set backlog quota on topic level. Based on the system topic function, refer to @codelipenghui topic-level backlog quota based on zk implementation ###Modifications Support get-backlog-quotas on topic level. Support set-backlog-quota on topic level. Support remove-backlog-quota on topic level.
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Sep 5, 2020
### Motivation Support set backlog quota on topic level. Based on the system topic function, refer to @codelipenghui topic-level backlog quota based on zk implementation ###Modifications Support get-backlog-quotas on topic level. Support set-backlog-quota on topic level. Support remove-backlog-quota on topic level.
jiazhai
pushed a commit
that referenced
this pull request
Sep 15, 2020
…stence polices, message TTL, and backlog quota on topic level (#7852) Motivation In PRs, #7738, #7646, #7817, persistence polices, message TTL, and backlog quota policies are supported on topic level. The PR for code modification is updated and merged. but the doc is not updated accordingly. This PR is used to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level. Modifications Update the Pulsar Admin CLI doc to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level. * Update backlog-quota policies on topic level * update contents * update contents
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Oct 3, 2020
…stence polices, message TTL, and backlog quota on topic level (apache#7852) Motivation In PRs, apache#7738, apache#7646, apache#7817, persistence polices, message TTL, and backlog quota policies are supported on topic level. The PR for code modification is updated and merged. but the doc is not updated accordingly. This PR is used to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level. Modifications Update the Pulsar Admin CLI doc to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level. * Update backlog-quota policies on topic level * update contents * update contents
Member
|
Move this change to 2.6.2, because the #8199 depends on it. |
wolfstudy
pushed a commit
that referenced
this pull request
Oct 30, 2020
### Motivation Support set backlog quota on topic level. Based on the system topic function, refer to @codelipenghui topic-level backlog quota based on zk implementation ###Modifications Support get-backlog-quotas on topic level. Support set-backlog-quota on topic level. Support remove-backlog-quota on topic level. (cherry picked from commit 26c49a8)
This file contains hidden or 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
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.
Motivation
Support set backlog quota on topic level.
Based on the system topic function, refer to @codelipenghui topic-level backlog quota based on zk implementation
###Modifications
Support get-backlog-quotas on topic level.
Support set-backlog-quota on topic level.
Support remove-backlog-quota on topic level.
Verifying this change
This change added tests and can be verified as follows:
TopicBacklogQuotaTest.javaDoes this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesyes)Documentation
yes)docs/JavaDocs)