-
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][offload]keep topic/ns set-offload-policies consistent behavior logic #20646
[improve][offload]keep topic/ns set-offload-policies consistent behavior logic #20646
Conversation
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.
Perfect
+1
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.
Great!
/pulsarbot rerun-failure-checks |
@tisonkun How do you ensure the correctness of the pr? Did you run the code and test it yourself, or can you tell if there is a problem just by looking at the code? I don't quite understand, please explain |
This patch contains tests and the code is correct and straightforward - normal review process.
Please avoid an imperative tone. I don't have to explain it to you. |
/pulsarbot rerun-failure-checks |
1 similar comment
/pulsarbot rerun-failure-checks |
Blocked by #20661. @ethqunzhong please keep an eye on that issue before doing repeatedly retry. |
got |
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #20646 +/- ##
=============================================
+ Coverage 33.58% 73.06% +39.48%
- Complexity 12127 31991 +19864
=============================================
Files 1613 1867 +254
Lines 126241 138737 +12496
Branches 13770 15258 +1488
=============================================
+ Hits 42396 101370 +58974
+ Misses 78331 29313 -49018
- Partials 5514 8054 +2540
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Merging.. Thank you! |
Motivation
The existing behavior logic of the namespaces/topics set offload-policies is inconsistent.
The namespaces set-offload-policies does not support configuring the filesystem because the
bucket
options are set asrequired
.cli options are different, and the behavior of supporting unit conversion is inconsistent. eg:
For example, there are two admin API methods to configure offload policy for
persistent://myprop/clust/ns1/ds1
:a. namespaces set-offload-policies in cli commond
set-offload-policies myprop/clust/ns1 -d s3 -r region -b bucket -e endpoint -mbs 32M -rbs 5M -oat 10M -oats 100 -oae 10s -orp tiered-storage-first
b. topics set-offload-policies in cli commond
set-offload-policies persistent://myprop/clust/ns1/ds1 -d s3 -r region -b bucket -e endpoint -m 33554432 -rb 5242880 -t 10485760 -ts 100 -dl 10000 -orp tiered-storage-first
The command has the same effect, but their command options are different and whether they recognize parameter units
is also different. This can easily confuse users.
Modifications
bucket
required=true
in namespace#set-offload-policies.Verifying this change
This change is already covered by supplementary unit-test.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: ethqunzhong#7