pulsar
pulsar copied to clipboard
[improve][broker] Use the Producer stats instead of msgOut in geo
Motivation
In geo, the msgOut is inaccurate:
- When
Entryis batch message, theorg.apache.pulsar.common.stats.Rate#countAdderandorg.apache.pulsar.common.stats.Rate#totalCountAdderincrement only once. - 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
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete
Matching PR in forked repository
PR in forked repository: