-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]Non-global topic policies and global topic policies overwrite each other #24286
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][broker]Non-global topic policies and global topic policies overwrite each other #24286
Conversation
|
/pulsarbot rerun-failure-checks |
...ker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #24286 +/- ##
============================================
+ Coverage 73.57% 74.24% +0.66%
+ Complexity 32624 32257 -367
============================================
Files 1877 1866 -11
Lines 139502 145124 +5622
Branches 15299 16593 +1294
============================================
+ Hits 102638 107746 +5108
+ Misses 28908 28836 -72
- Partials 7956 8542 +586
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…write each other (apache#24286) (cherry picked from commit 6662471)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 323e2ff)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 5cfd804)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 5cfd804)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 5cfd804)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 5cfd804)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 5cfd804)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 323e2ff)
…write each other (apache#24286) (cherry picked from commit 6662471) (cherry picked from commit 5cfd804)
…write each other (apache#24286) (cherry picked from commit 6662471)
|
@poorbarcode It seems that this change should be covered with a PIP. Do you agree? |
Could you explain why it is needed? |
This PR changed the way how topic policies are stored. It would be useful to have such details documented in PIPs. This change was also cherry-picked to maintenance branches and it would be useful to document the backwards compatibility in the PIP document. |
| CompletableFuture<MessageId> deletePolicies = writer.deleteAsync(getEventKey(event, true), event) | ||
| .thenCompose(__ -> { | ||
| return writer.deleteAsync(getEventKey(event, false), event); | ||
| }); |
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.
@poorbarcode @lhotari It's a bit strange, why isn't CompletableFuture.allOf used here?
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.
I think using CompletableFuture.allOf can benefit the performance. Thanks for mentioning this improvement
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.
Of course, you can submit a small PR later.
Motivation
Issue 1: Non-global topic policies and global topic policies overwrite each other
20001000__change_events1000Issue 2: Global policy can not be removed successfully
1000Modifications
Fix two issues
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x