You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nodece (via GitHub)" <gi...@apache.org> on 2023/12/18 17:49:50 UTC

[PR] [improve][broker] Use the Producer stats instead of msgOut in geo [pulsar]

nodece opened a new pull request, #21746:
URL: https://github.com/apache/pulsar/pull/21746

   ### Motivation
   
   In geo, the `msgOut` is inaccurate:
   
   1. When `Entry` is batch message, the `org.apache.pulsar.common.stats.Rate#countAdder` and `org.apache.pulsar.common.stats.Rate#totalCountAdder` increment only once.
   2. When the network fails, the `org.apache.pulsar.common.stats.Rate#recordEvent(long)` shouldn't be called, due to the message cannot be sent to the remote cluster.
   
   ### Modifications
   
   Use the Producer stats instead of msgOut in geo.
   
   ### Verifying this change
   
   Just to verify the `msgRateOut` and `msgThroughputOut` doesn't equal to 0.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [improve][broker] Use the Producer stats instead of msgOut in geo [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece closed pull request #21746: [improve][broker] Use the Producer stats instead of msgOut in geo
URL: https://github.com/apache/pulsar/pull/21746


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [improve][broker] Use the Producer stats instead of msgOut in geo [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on PR #21746:
URL: https://github.com/apache/pulsar/pull/21746#issuecomment-6354362721

   Hi @nodece, thanks for this, and sorry it sat so long. The batching under-count is still there on master (`GeoPersistentReplicator`/`ShadowReplicator` record one event per entry), but I'd rather not turn on client stats for the replication client: it adds a stats recorder per replicator, still counts resends after reconnects, and would leave the `msgOutCounter`/`bytesOutCounter` added in #22972 counting entries. The fix that fits master now is broker-side: record `numMessagesInBatch` for the `Rate` and both counters, ideally from the send callback on success. Since that's a different change on code that has been reworked since, I'm closing this one. A new PR along those lines would be very welcome.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [improve][broker] Use the Producer stats instead of msgOut in geo [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed pull request #21746: [improve][broker] Use the Producer stats instead of msgOut in geo
URL: https://github.com/apache/pulsar/pull/21746


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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