Skip to content
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

[Bug] pulsar-admin namespaces set-retention not work #18514

Closed
2 tasks done
labuladong opened this issue Nov 17, 2022 · 1 comment · Fixed by #18526
Closed
2 tasks done

[Bug] pulsar-admin namespaces set-retention not work #18514

labuladong opened this issue Nov 17, 2022 · 1 comment · Fixed by #18526
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@labuladong
Copy link
Contributor

Search before asking

  • I searched in the issues and found nothing similar.

Version

Master version of Pulsar.

Minimal reproduce step

  1. start stanalone Pulsar.
  2. use pulsar-admin namespace set-retention then pulsar-admin namespace get-retention:

image

What did you expect to see?

Retention setting has changed.

What did you see instead?

Retention setting didn't change.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@labuladong
Copy link
Contributor Author

This is not a cli bug, because the --size and --time need to specify a unit. The default is byte and second, so it will be considered as 0 if too small:

Usage: set-retention [options] tenant/namespace
  Options:
  * --size, -s
      Retention size limit with optional size unit suffix. For example, 4096,
      10M, 16G, 3T.  The size unit suffix character can be k/K, m/M, g/G, or
      t/T.  If the size unit suffix is not specified, the default unit is
      bytes. 0 or less than 1MB means no retention and -1 means infinite size
      retention
  * --time, -t
      Retention time with optional time unit suffix. For example, 100m, 3h,
      2d, 5w. If the time unit is not specified, the default unit is seconds.
      For example, -t 120 sets retention to 2 minutes. 0 means no retention
      and -1 means infinite time retention.

But the site document is wrong, so fix doc in #18526.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant