You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by 樊建业 <fa...@bigo.sg.INVALID> on 2022/10/31 02:30:58 UTC

[DISCUSS] Do not grant permission for each partition to reduce unnecessary zk metadata

Hi All,

Now when we grant permission on a partitioned-topic, pulsar broker would try to grant permission on each partition. This would result in generating many unnecessary zk metadata and updating zk node repeatedly when granting permission. 

This problem is shown in https://github.com/apache/pulsar/issues/16768 <https://github.com/apache/pulsar/issues/16768> and discussed in https://github.com/apache/pulsar/pull/16792 <https://github.com/apache/pulsar/pull/16792> .  Actually in the current permission module, it is no need to grant permission on each partition when creating a multi-partition topic. And in order to meet the compatibility with previous pulsar version, there are two implementation. 


Selected implementation
 I prefer to this implementation, described in  https://github.com/apache/pulsar/pull/18222 <https://github.com/apache/pulsar/pull/18222> .
In this implementation, we only change the behaviour of grant permission on based topic.


Alternative implementation
Described in https://github.com/apache/pulsar/pull/16792 <https://github.com/apache/pulsar/pull/16792> 
In this implementation, we would change the behavior of grant permission on both based topic and partition. 

Thanks!
Ken