Skip to content

[DOCS] - Update the topic-level policies - #9530

Merged
zymap merged 8 commits into
apache:masterfrom
sijia-w:fix-9161
Mar 6, 2021
Merged

zymap merged 8 commits into
apache:masterfrom
sijia-w:fix-9161

Conversation

@sijia-w

@sijia-w sijia-w commented Feb 8, 2021

Copy link
Copy Markdown
Contributor

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.

@codelipenghui codelipenghui added this to the 2.8.0 milestone Feb 8, 2021
@Jennifer88huang-zz Jennifer88huang-zz added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. component/topic-policy release/2.7.1 labels Feb 8, 2021
Comment thread site2/docs/reference-pulsar-admin.md Outdated
|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|

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default values and description have been fixed in #9395
So I sincerely suggest that we rebase the master first and then make edits.

Comment thread site2/docs/reference-pulsar-admin.md Outdated
### `get-backlog-quotas`
Get the backlog quota policies for a topic.
### `enable-deduplication`
Enable a deduplication policy for a topic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread site2/docs/reference-pulsar-admin.md Outdated
=======
### `get-deduplication`
Get a deduplication policy for a topic.
### `disable-deduplication`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@315157973 Just wanna double confirm
image
all these commands are deprecated, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecated commands are in initDeprecatedCommands method of CmdTopics.java

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

The deprecated command is in this method

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused about the following commands (see #9108)
image
Are get-max-unacked-messages-on-subscription and get-max-unacked-messages-per-subscription removed too? Or the second one is still in use?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I agree, I think we should apply the changes to 2.7.x.

@Jennifer88huang-zz Jennifer88huang-zz left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sijia-w

  1. 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.
  2. Please keep your commands consistent with changes in #9215. For example, we do not have get-deduplication-enabled now.
  3. 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.

@zymap

zymap commented Feb 23, 2021

Copy link
Copy Markdown
Member

@sijia-w Please rebase your code, we have fixed the CI problem at master.

@jennifer88huang Please take another look at this PR.

@Jennifer88huang-zz

Copy link
Copy Markdown
Contributor

@zymap thank you for your reminder.
@sijia-w it seems that there are sth not quite correct with the latest update. Maybe we can sync on it when you're available. @315157973 you can also check the PR content. Thank you.


Usage
```bash
$ pulsar-admin topics set-deduplication tenant/namespace/topic options

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Huanli-Meng Huanli-Meng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave my comments. PTAL. And only master needs to be updated?

Comment thread site2/docs/reference-pulsar-admin.md Resolved
Comment thread site2/docs/reference-pulsar-admin.md Resolved
Comment thread site2/docs/reference-pulsar-admin.md Resolved
Comment thread site2/docs/reference-pulsar-admin.md Outdated
```

### `get-max-producers`
Get the maximum number of Producers for a topic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Get the maximum number of Producers for a topic.
Get the maximum number of producers for a topic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for the following.

@sijia-w

sijia-w commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

@315157973 @Huanli-Meng Please approve if there is nothing to update further. Thank you.

@zymap

zymap commented Mar 6, 2021

Copy link
Copy Markdown
Member

/pulsarbot run-failure-checks

@zymap
zymap merged commit df49876 into apache:master Mar 6, 2021
mlyahmed pushed a commit to mlyahmed/pulsar that referenced this pull request Mar 7, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/2.7.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retention support per topic

6 participants