You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/01 21:19:30 UTC

[GitHub] [pulsar] bharanic-dev commented on pull request #10008: [PIP-82] [pulsar-broker] Add a task to publish resource usage to a topic

bharanic-dev commented on pull request #10008:
URL: https://github.com/apache/pulsar/pull/10008#issuecomment-812178751


   Hi @315157973 , I have already outlined some of the reasons why we decided to not use SystemTopic (please see https://github.com/apache/pulsar/pull/10008#discussion_r601594478).
   
   If we are to use SystemTopic to exchange 'resource usage', it will require significant refactoring to SystemTopic. There is really not much overlap in functionality other than creating one producer and one consumer. In my opinion, there is nothing much to gain to refactor the SystemTopic code just to use a couple of lines of code.
   
   With respect to allowAutoTopicCreation=false, 
   - we don't expect this to be set to false for 'system' tenant.
   - even if it is, it just means that the resource usage cannot be exchanged and the default behavior will be what it is today (no quota enforcement). 
   - And if the user chooses to have 'resource quota enforcement' while having allowAutoTopicCreation=false, the expectation is that the user creates the "resource usage publish topic" explicitly using the admin API.
   
   [ side note: from looking at the code, I am not able figure out how SystemTopic handles the allowAutoTopicCreation= false; I'd appreciate if you can provide code pointers or documentation that explain. It would help to me to get familiarized. ]
   
   And to your other point of inactive topic, by default the resource usage topic is non-persistent as the brokers are only interested in the current/recent usage for calculating the quotas, not historical usage. If the user chooses to use a persistent topic (via configuration) for some reason, it should be fine to assume that the user knows what they are doing and take necessary steps (they may be OK for the topic to be deleted as inactive or they may not be).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org