jolshan commented on code in PR #19902:
URL: https://github.com/apache/kafka/pull/19902#discussion_r2127363646
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerAppendInfo.java:
##########
@@ -110,6 +110,13 @@ private void checkProducerEpoch(short producerEpoch, long
offset) {
}
private void checkSequence(short producerEpoch, int appendFirstSeq, long
offset) {
+ // For transactions v2 idempotent producers, reject non-zero sequences
when there is no producer ID state
+ if (verificationStateEntry != null &&
verificationStateEntry.supportsEpochBump() &&
+ appendFirstSeq != 0 && currentEntry.isEmpty()) {
Review Comment:
Correct. We could have a producer epoch on the producer if the state was
expired on the server, and we don't want to allow non-zero sequences in that
case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]