Sean Quah created KAFKA-20912:
---------------------------------
Summary: Unhappy paths for non-replaying writes lead to divergence
between in-memory state and log
Key: KAFKA-20912
URL: https://issues.apache.org/jira/browse/KAFKA-20912
Project: Kafka
Issue Type: Bug
Components: group-coordinator
Affects Versions: 4.0.0
Reporter: Sean Quah
Assignee: Sean Quah
Discovered when fixing KAFKA-20845 and in a similar vein.
Since 4.0:
* When a non-replaying write operation throws before append, we leave
in-memory state changes in place without writing corresponding records.
* Same for when append() for that write operation throws.
Since KAFKA-19760 (potentially split this into a separate ticket):
* When there is an existing batch, a large non-replaying write attaches its
in-memory state changes to the existing batch, flushes it, then writes its
records in a new batch. This is wrong. In-memory state changes and records must
be accepted or rejected together, atomically otherwise we can get divergence
between in-memory state and the log.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)