Repository navigation
[DOCS] - Update the topic-level policies - #9530
Conversation
| |Flag|Description|Default| | ||
| |----|---|---| | ||
| |`-ttl`, `--messageTTL`|Message TTL in seconds. When the value is set to `0`, TTL is disabled. TTL is disabled by default. |0| | ||
| |`-ttl`, `--messageTTL`|Message TTL in seconds|3600s| |
There was a problem hiding this comment.
It seems that there are many places to confirm according to the code. The default value here should be 0 (disabled),because the default values of topic and namespace-level are both null (not set)
we can see the broker-level default value in broker.conf (ttlDurationDefaultInSeconds)
namespace-level default value in pulsar/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
topic-level default in pulsar/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/TopicPolicies.java
There was a problem hiding this comment.
The default values and description have been fixed in #9395
So I sincerely suggest that we rebase the master first and then make edits.
| ### `get-backlog-quotas` | ||
| Get the backlog quota policies for a topic. | ||
| ### `enable-deduplication` | ||
| Enable a deduplication policy for a topic. |
There was a problem hiding this comment.
In order to make topic-level and namespace-level consistent, these commands have been deprecated. See CmdTopics#CmdTopics for details.
The deprecated commands are in CmdTopics#initDeprecatedCommands
| ======= | ||
| ### `get-deduplication` | ||
| Get a deduplication policy for a topic. | ||
| ### `disable-deduplication` |
There was a problem hiding this comment.
@315157973 Just wanna double confirm

all these commands are deprecated, right?
There was a problem hiding this comment.
The deprecated commands are in initDeprecatedCommands method of CmdTopics.java
There was a problem hiding this comment.
@315157973 @jennifer88huang I just checked this java file, and I found all added commands in this pr are deprecated. Can you both help double confirm?
There was a problem hiding this comment.
I am confused about the following commands (see #9108)

Are get-max-unacked-messages-on-subscription and get-max-unacked-messages-per-subscription removed too? Or the second one is still in use?
There was a problem hiding this comment.
Based the code on the master branch, in the issue mentioned by @jennifer88huang , the command names of topic-level and namespace-level have been unified, #9205
E.g:
The topic level get-maxProducers has been changed to get-max-producers, and get-maxProducers is marked as deprecated.
The deprecated command will not be deleted immediately, it can still be used, but it will no longer be displayed when user enters --help, and may be deleted at some point in the future.
Since the code is in the master branch, one thing that needs to be confirmed is whether this PR will be cherry-picked to 2.7.x and the document should correspond to it @codelipenghui
There was a problem hiding this comment.
yes, I agree, I think we should apply the changes to 2.7.x.
There was a problem hiding this comment.
- Have you rebased your branch before making changes? From L1759-1854, it's content added in #9108. If you delete those content in this PR, it will overwrite the content in the master.
- Please keep your commands consistent with changes in #9215. For example, we do not have
get-deduplication-enablednow. - When the content is ready in this PR, could you please apply those changes to 2.7 and 2.7.1 as well? Thank you.
|
@sijia-w Please rebase your code, we have fixed the CI problem at master. @jennifer88huang Please take another look at this PR. |
|
@zymap thank you for your reminder. |
|
|
||
| Usage | ||
| ```bash | ||
| $ pulsar-admin topics set-deduplication tenant/namespace/topic options |
There was a problem hiding this comment.
Do we now support tenant-level policies? Seems not merged yet.
Huanli-Meng
left a comment
There was a problem hiding this comment.
leave my comments. PTAL. And only master needs to be updated?
| ``` | ||
|
|
||
| ### `get-max-producers` | ||
| Get the maximum number of Producers for a topic. |
There was a problem hiding this comment.
| Get the maximum number of Producers for a topic. | |
| Get the maximum number of producers for a topic. |
There was a problem hiding this comment.
same for the following.
|
@315157973 @Huanli-Meng Please approve if there is nothing to update further. Thank you. |
|
/pulsarbot run-failure-checks |
Fixes apache#8899 Update the description of the newly added topic-level policies in apache#2688. This pr fixes apache#9161, the branch of which was deleted incorrectly.

Fixes #8899
Update the description of the newly added topic-level policies in #2688.
This pr fixes #9161, the branch of which was deleted incorrectly.