Skip to content
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

Producers for geo-replication should be excluded from the publishers field of topic stats #22442

Closed
2 tasks done
massakam opened this issue Apr 5, 2024 · 0 comments · Fixed by #22556
Closed
2 tasks done
Assignees
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@massakam
Copy link
Contributor

massakam commented Apr 5, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

After upgrading the version of Pulsar used at our company, the publishers field of topic stats now includes producers whose names start with pulsar.repl., which were not included before. These are producers created by brokers in other clusters for geo-replication.

"publishers" : [ {
  "accessMode" : "Shared",
  "msgRateIn" : 0.0,
  "msgThroughputIn" : 0.0,
  "averageMsgSize" : 0.0,
  "chunkedMessageRate" : 0.0,
  "producerId" : 0,
  "supportsPartialProducer" : false,
  "metadata" : { },
  "address" : "/xxx.xxx.xxx.xxx:37102",
  "connectedSince" : "2024-04-04T14:23:33.666865+09:00",
  "clientVersion" : "2.10.5",
  "producerName" : "pulsar.repl.dev"
} ],

Producers for geo-replication started to appear in publishers due to the following PR:
#20229

Although this PR is treated as a bug fix, it seems that the exclusion of geo-replication producers from publishers was intentional, so I think this is a specification change.

I think geo-replication producers should be excluded from publishers. These are unknown producers to normal users, so they confuse users who look at topic stats. I think that the mechanism for achieving geo-replication should be hidden from users as much as possible.

Solution

I would like to revert #20229. In addition to that, the publishers and producerCount fields in broker stats also include the number of geo-replication producers, so I'd like to exclude that from them too if possible.

Alternatives

If #20229 should not be completely reverted, there is an option to add a query parameter to the REST APIs for retrieving topic stats/broker stats to determine whether publishers should include geo-replication producers. Even in this case, I'd like to hide geo-replication producers by default. I suggest showReplicatorProducers as the name of the query parameter.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@massakam massakam added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 5, 2024
@lhotari lhotari assigned massakam and unassigned massakam Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
1 participant