TaiJuWu created KAFKA-21518:
-------------------------------
Summary: Throttled ShareFetch uses up the delivery count of the
records it acquired
Key: KAFKA-21518
URL: https://issues.apache.org/jira/browse/KAFKA-21518
Project: Kafka
Issue Type: Bug
Reporter: TaiJuWu
Assignee: TaiJuWu
When a ShareFetch request is throttled by a client quota, the broker has
already acquired records for it, which increments their delivery count, but it
returns an empty response. The acquired records are not released, so they are
only delivered again after the acquisition lock times out, with a higher
delivery count. With a low delivery count limit, records are archived without
ever being delivered.
*Steps*
# A cluster with 3 brokers and the default broker and share group configs,
except \{{share.auto.offset.reset=earliest}}.
# Set \{{consumer_byte_rate=20000}} for a client id.
# Produce 400 records of 1000 bytes.
# Consume them with two share consumers which use that client id.
*Expected:* every record is first delivered with delivery count 1.
*Actual:* 192 of the 400 records are first delivered with delivery count 2,
after the acquisition lock (30 seconds by default) expires. With
\{{share.delivery.count.limit=2}} and a 3 second lock, those 192 records are
archived without being delivered to any consumer.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)