Hrishi Baskaran created KAFKA-21015:
---------------------------------------
Summary: Refactor producer control-record appends to use a single
log append
Key: KAFKA-21015
URL: https://issues.apache.org/jira/browse/KAFKA-21015
Project: Kafka
Issue Type: Improvement
Components: core
Reporter: Hrishi Baskaran
Assignee: Hrishi Baskaran
{{KafkaApis.scala}} currently handles the append of control records separately
for each {{{}producerId{}}}. The existing approach makes it straightforward to
perform producer-specific writes, but results in multiple appends to the log
when a single append could potentially be used.
The TODO in {{KafkaApis.scala}} identifies a cleaner design:
* Move construction/filtering of control records into {{{}Log{}}}.
* Have {{Log}} append only control records whose producer epoch is valid.
* Expose a new {{appendControlRecord}} API from {{{}ReplicaManager{}}}.
* Update the request handling path in {{KafkaApis.scala}} to use the new API
and perform a single log append.
The current implementation intentionally uses the simpler
per-{{{}producerId{}}} append approach. This ticket is to remove that
limitation and consolidate the operation while preserving the existing
producer-epoch validation semantics.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)