equanz opened a new pull request #10534: URL: https://github.com/apache/pulsar/pull/10534
Master Issue: https://github.com/apache/pulsar/wiki/PIP-79%3A-Reduce-redundant-producers-from-partitioned-producer ### Motivation Please see the PIP document. This is a part of implementations. **Before review it, please check https://github.com/apache/pulsar/pull/10279. After https://github.com/apache/pulsar/pull/10279 is merged, I will rebase to top of master branch.** ### Modifications * Change PartitionedTopicStats to support partial partitioned producer like [this(#10279)](https://github.com/equanz/pulsar/blob/a04a7bec47ed78258ef9bdc1b0120f987762f2f6/pulsar-client/src/main/java/org/apache/pulsar/client/impl/customroute/PartialRoundRobinMessageRouterImpl.java) For backward compatibility reason, I introduce new producer property `producerStatsKey`. If this property is same, then associate publisher stats as same producer at partitioned producer stats. I think about using `producerName` instead of introducing `producerStatsKey`, but I think we should not use it. Because currently `producerName` is configured by the system(different for each partition) or yourself(same between all partitions). Therefore, if we use `producerName` as association key, we should change system behavior (I think this is breaking changes) or request to user that "you should set `producerName` yourself if you want to associate publisher stats per partitioned producer". If any suggestions, please comment to this PR. ### Verifying this change * [ ] Make sure that the change passes the CI checks. This change added tests and can be verified as follows: * Added test for partitioned producer stats ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* - Dependencies (does it add or upgrade a dependency): (no) - The public API: (no) - The schema: (yes) - https://github.com/apache/pulsar/blob/c0a48454bf4199943c1ca7cf821e6351843a55ee/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PublisherStats.java#L49 - The default values of configurations: (no) - The wire protocol: (yes) - https://github.com/apache/pulsar/blob/c0a48454bf4199943c1ca7cf821e6351843a55ee/pulsar-common/src/main/proto/PulsarApi.proto#L259 - https://github.com/apache/pulsar/blob/c0a48454bf4199943c1ca7cf821e6351843a55ee/pulsar-common/src/main/proto/PulsarApi.proto#L486 - https://github.com/apache/pulsar/blob/c0a48454bf4199943c1ca7cf821e6351843a55ee/pulsar-common/src/main/proto/PulsarApi.proto#L636 - The rest endpoints: (no) - The admin cli options: (no) - Anything that affects deployment: (no) ### Documentation * Does this pull request introduce a new feature? (no) -- 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: [email protected]
