Jason918 commented on a change in pull request #14330:
URL: https://github.com/apache/pulsar/pull/14330#discussion_r809653887
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java
##########
@@ -282,7 +282,7 @@ public boolean readCompacted() {
// calculate avg message per entry
int tmpAvgMessagesPerEntry = AVG_MESSAGES_PER_ENTRY.get(this);
- tmpAvgMessagesPerEntry = (int) Math.round(tmpAvgMessagesPerEntry *
avgPercent
+ tmpAvgMessagesPerEntry = (int) Math.floor(tmpAvgMessagesPerEntry *
avgPercent
Review comment:
> no, we should not use double which will not solve it.
Why not? Please take another look.
This fix solve the case from 6 to 1, but aggravated the case like that the
value should increase from 1 to 6.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]