Skip to content

Commit 13c89e8

Browse files
KAFKA-19965: Increasing batch size to fix throttled delivery test (#21081)
The PR increases the max.poll.records config to 512 as the produced batch is of 512 records. SharePartition creates batches as per `share fetch` request batch-size config, which is currently controlled by max.poll.records. Drfault max.poll.records config is 500 and If producer generates multiple batches on log then there will be multiple batches in share partition. The throttled response in fetch is based on batch size in share partition hence subsequent throttles fetch calls can have different sizes as per the produces batches. To make sure the batch is of correct size in share partition increase the max.poll.records to 512. The same has been done in other test but missed in the current PR test: https://github.com/apache/kafka/blob/a8b1fb9203133a356732bf069aa3e0dd9b1716b7/clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java#L3707 Reviewers: Andrew Schofield <[email protected]>, Lan Ding <[email protected]>
1 parent a8b1fb9 commit 13c89e8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3492,7 +3492,11 @@ public void testFetchWithThrottledDeliveryBatchesWithIncreasedDeliveryLimit() {
34923492
try (Producer<byte[], byte[]> producer = createProducer();
34933493
ShareConsumer<byte[], byte[]> shareConsumer = createShareConsumer(
34943494
"group1",
3495-
Map.of(ConsumerConfig.SHARE_ACKNOWLEDGEMENT_MODE_CONFIG, EXPLICIT))
3495+
Map.of(
3496+
ConsumerConfig.SHARE_ACKNOWLEDGEMENT_MODE_CONFIG, EXPLICIT,
3497+
ConsumerConfig.MAX_POLL_RECORDS_CONFIG, 512
3498+
)
3499+
)
34963500
) {
34973501
// Produce records in complete power of 2 to fully test the throttling behavior.
34983502
int producedMessageCount = 512;

0 commit comments

Comments
 (0)