-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][cli] Fix set-retention with >2GB size value for topic policy #23689
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
[fix][cli] Fix set-retention with >2GB size value for topic policy #23689
Conversation
f7f5c1b to
84497c7
Compare
84497c7 to
4ce3296
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23689 +/- ##
============================================
+ Coverage 73.57% 74.41% +0.84%
- Complexity 32624 35082 +2458
============================================
Files 1877 1945 +68
Lines 139502 147448 +7946
Branches 15299 16270 +971
============================================
+ Hits 102638 109724 +7086
- Misses 28908 29242 +334
- Partials 7956 8482 +526
Flags with carried forward coverage won't be shown. Click here to find out more.
|
liangyepianzhou
left a comment
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
dao-jun
left a comment
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
|
If do not cherry-pick into
|
@poorbarcode I don't think that this applies to 3.0.x since the regression was introduced in changes made in #20782 (and possibly #22209) which aren't part of 3.0.x. The issue #22138 was reported to be a regression in 3.2.0 . When we fixed this issue, we missed fixing it for topic policies and only fixed the namespace policies level. |
Motivation
Fixes a similar issue as #22150, for
pulsar-admin topics set-retentionandpulsar-admin topicPolicies set-retentioncommands. Related to #23688. This adds a test to #23688 changes.The impact of this bug is that when the value overflows when it's over 2GB. The effective value becomes negative or 0, which disables retention. There won't be a failure. For example, with the parameter
-s 3G, the value becomes-1024. With any value more than 4GB, the value becomes0.Modifications
Documentation
docdoc-requireddoc-not-neededdoc-complete