poorbarcode commented on code in PR #23931:
URL: https://github.com/apache/pulsar/pull/23931#discussion_r1968729927
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ConsumerStatsTest.java:
##########
@@ -480,6 +480,10 @@ public void testAvgMessagesPerEntry() throws Exception {
metadataConsumer.put("matchValueReschedule", "producer2");
@Cleanup
Consumer<String> consumer =
pulsarClient.newConsumer(Schema.STRING).topic(topic).properties(metadataConsumer)
+ // Since https://github.com/apache/pulsar/pull/23931 improved
the performance of delivery, the consumer
+ // will get more messages than before(it only receives 1
messages at the first delivery), we set queue
+ // size to `1` to keep the test passing.
+ .receiverQueueSize(1)
Review Comment:
> Could you please provide more context about this change?
- In original design, the first read of a subscription only has one message,
because broker calculate the avg message size by `msg read out / count`, so it
read `1` message when `{msg read out}` is `0`
- This test always assumed the quantity of messages read out at the first
time is `1`, see:
https://github.com/apache/pulsar/pull/23931/files#diff-6e0b3de39cd005ecdedb9375327d65773640082cf70d44407ec79b2d553080b8R508-L505
--
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]