[fix][cli] Fix set-retention with >2GB size value for topic policy#23689
[fix][cli] Fix set-retention with >2GB size value for topic policy#23689lhotari merged 1 commit intoapache:masterfrom
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.
|
|
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