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
[improve][pip] PIP-347: add role field in consumer's stat #22562
base: master
Are you sure you want to change the base?
Conversation
PTAL, thanks. @lhotari @codelipenghui @BewareMyPower @Technoboy- @dao-jun @poorbarcode |
/** the role used for authorization. */ | ||
String getRole(); |
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.
Since this PR adds a new method to an existing public interface in the pulsar-xxx-api
module, it needs a PIP.
We have a strong need to trace back the owner of a specific subscription
It's better to explain a bit more for why the role is needed here. From the wiki of statistics
Statistics (from German: Statistik, orig. "description of a state, a country")[1][2] is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data.
The role info is more like an attribute of a consumer, not a statistics. Generally, the role info never changes unlike other fields (e.g. the in/out rate)
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.
this is the pip for this pr: #22564.
Motivation
By setting config
allowAutoSubscriptionCreation=true
, we allow user to create subscriptions automatically if user have theconsume
permission.We have a strong need to trace back the owner of a specific subscription, but currently there is no such way to achieve that.
Modifications
Add field
role
in the stats response.Verifying this change
(Please pick either of the following options)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: thetumbled#48