[improve][broker] do not grant permission for each partition to reduce unnecessary zk metadata - #18222
Conversation
|
@TakaHiR07 It's better to have a discussion on the dev mailing list. We will change the behavior of the current implementation. Just make sure everyone is clear about what we will change. |
Discussion on https://lists.apache.org/thread/6hy1jl725r20xn48y8wh9t76k9f3lw4c. PTAL @codelipenghui @michaeljmarshall |
|
The pr had no activity for 30 days, mark with Stale label. |
|
/pulsarbot rerun-failure-checks |
86046fc to
5fc1659
Compare
|
This PR considers the partition topic as a whole, and the user needs to use the base topic instead of the partition topic, I think this change is correct. If there is no problem, I will merge this PR after the CI is passed. |
5fc1659 to
5e555e4
Compare
Codecov Report
@@ Coverage Diff @@
## master #18222 +/- ##
============================================
- Coverage 73.13% 73.13% -0.01%
+ Complexity 32101 32089 -12
============================================
Files 1871 1871
Lines 138982 138974 -8
Branches 15283 15281 -2
============================================
- Hits 101651 101637 -14
- Misses 29280 29285 +5
- Partials 8051 8052 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@nodece why did you commit this patch? It looks like a breaking change and it would have required a PIP and a discussion on the ML. Also in order to commit this kind of security related patches it is better to wait for a review by other experienced committers |
|
In our authorization provider, we already check the partition topic and base topic permissions, see https://github.com/apache/pulsar/blob/branch-3.0/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java#L386-L397, so I think this PR can be merged into the master branch. There may be some changes for third-party plugins, but for the built-in plugins, I think there is no breaking change. |
…e unnecessary zk metadata (#18222) Co-authored-by: fanjianye <fanjianye@bigo.sg>
Master Issue: #16768
Motivation
The problem has been discussed before in #16792. And now I found that when creating a topic with large partition such as 500 on a cluster which already has many topics, it would frequently update zk node, put more pressure on zk, maybe result in zk node not available. Therefore I think we'd better fix this problem.
Since the discussion in #16792 , there are 2 ways to enhance grant permission module. This is the second implementation, which I think is a better way to fix, and can have better compatibility with previous version.
Modifications
do not grant permission for each partition
pulsar old version
pulsar new version
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: TakaHiR07#1