-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][admin]namespace CLI set-offload-policy's thresholdBytes support negative and 0 #17502
[improve][admin]namespace CLI set-offload-policy's thresholdBytes support negative and 0 #17502
Conversation
@Technoboy- @zymap @hangc0276 PTAL. |
/pulsarbot run-failure-checks |
@hangc0276 @zymap @Technoboy- This patch is ready to merge. PTAL. |
/pulsarbot run-failure-checks |
it seems pass all CI, ready to merged. PTAL @zymap |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
@Technoboy- ready to merged. PTAL |
@codelipenghui ready to merged. PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation
we could set namespace level offload-policy's offload-threshold In the following two
pulsar-admin CLI
ways:pulsar-admin namespaces set-offload-threshold -s $OFFLOAD_THRESHOLD demo/demo
pulsar-admin namespaces set-offload-policies --offloadAfterThreshold $OFFLOAD_THRESHOLD demo/demo
while set offload-threshold value , Negative values disable automatic offload. 0 triggers offloading as soon as possible.
but we can't use
pulsar-admin namespaces set-offload-policies
to set offload-threshold'value to negative or 0 , show as follow:pulsar-admin namespaces set-offload-threshold
as expected.we should keep
set-offload-threshold
andset-offload-policies
CLI behavior consistent.Modifications
remove
positiveCheck
process while check offloadAfterThreshold value validity atCmdNamespaces#SetOffloadPolicies
.Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)