David Jacot created KAFKA-16846:
-----------------------------------

             Summary: Should TxnOffsetCommit API fail all the offsets if any 
fails the validation?
                 Key: KAFKA-16846
                 URL: https://issues.apache.org/jira/browse/KAFKA-16846
             Project: Kafka
          Issue Type: Improvement
            Reporter: David Jacot


While working on KAFKA-16371, we realized that the handling of 
INVALID_COMMIT_OFFSET_SIZE errors while committer transaction offsets, is a bit 
inconsistent between the server and the client. On the server, the offsets are 
validated independently from each others. Hence if two offsets A and B are 
committed and A fails the validation, B is still written to the log as part of 
the transaction. On the client, when INVALID_COMMIT_OFFSET_SIZE is received, 
the transaction transitions to the fatal state. Hence the transaction will be 
eventually aborted.

The client side API is quite limiting here because it does not return an error 
per committed offsets. It is all or nothing. From this point of view, the 
current behaviour is correct. It seems that we could either change the API and 
let the user decide what to do; or we could strengthen the validation on the 
server to fail all the offsets if any of them fails (all or nothing). We could 
also leave it as it is.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to