You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "labuladong (via GitHub)" <gi...@apache.org> on 2023/02/02 02:53:06 UTC
[GitHub] [pulsar] labuladong opened a new pull request, #19300: [improve][cli] improve admin `set-backlog-quota` more clear
labuladong opened a new pull request, #19300:
URL: https://github.com/apache/pulsar/pull/19300
<!-- Either this PR fixes an issue, -->
Fixes #19196
<!-- or this PR is one task of an issue -->
### Motivation
The parameters of backlog retention policies need to be clarified. Size limit is only useful in `destination_storage` and time limit is only useful in `message_age`.
### Modifications
1. Make `--limit` optional, because `message_age` doesn't need this parameter but this parameter is `required` now.
2. When the quota type is `message_age`, use the time limit and ignore the size limit. When the quota type is `destination_storage`, use the size limit and ignore the time limit. Don't set them both, which can be confusing for users.
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### Does this pull request potentially affect one of the following parts:
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [x] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [x] `doc-complete` <!-- Docs have been already added -->
doc update: https://github.com/apache/pulsar-site/pull/394
### Matching PR in forked repository
PR in forked repository: https://github.com/labuladong/pulsar/pull/19
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] labuladong commented on a diff in pull request #19300: [improve][cli] improve admin `set-backlog-quota` more clear
Posted by "labuladong (via GitHub)" <gi...@apache.org>.
labuladong commented on code in PR #19300:
URL: https://github.com/apache/pulsar/pull/19300#discussion_r1094200996
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopicPolicies.java:
##########
@@ -977,8 +977,8 @@ private class SetBacklogQuota extends CliCommand {
private String policyStr;
@Parameter(names = {"-t", "--type"}, description = "Backlog quota type to set. Valid options are: "
- + "destination_storage and message_age. "
- + "destination_storage limits backlog by size (in bytes). "
+ + "destination_storage (default) and message_age. "
Review Comment:
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on a diff in pull request #19300: [improve][cli] improve admin `set-backlog-quota` more clear
Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui commented on code in PR #19300:
URL: https://github.com/apache/pulsar/pull/19300#discussion_r1093975003
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopicPolicies.java:
##########
@@ -977,8 +977,8 @@ private class SetBacklogQuota extends CliCommand {
private String policyStr;
@Parameter(names = {"-t", "--type"}, description = "Backlog quota type to set. Valid options are: "
- + "destination_storage and message_age. "
- + "destination_storage limits backlog by size (in bytes). "
+ + "destination_storage (default) and message_age. "
Review Comment:
The default is backlog size, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui merged pull request #19300: [improve][cli] improve admin `set-backlog-quota` more clear
Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui merged PR #19300:
URL: https://github.com/apache/pulsar/pull/19300
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Technoboy- closed pull request #19300: [improve][cli] improve admin `set-backlog-quota` more clear
Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- closed pull request #19300: [improve][cli] improve admin `set-backlog-quota` more clear
URL: https://github.com/apache/pulsar/pull/19300
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org