dajac commented on code in PR #14033: URL: https://github.com/apache/kafka/pull/14033#discussion_r1272522225
########## storage/src/main/java/org/apache/kafka/storage/internals/log/VerificationStateEntry.java: ########## @@ -58,14 +58,16 @@ public short epoch() { } /** - * We keep the lowest sequence seen in order to prevent an OutOfOrderSequence loop. This occurs in idempotent - * producers when a lower sequence fails with a retriable error and a higher sequence is successfully written. - * The lower sequence will fail with OutOfOrderSequence and retry until retries run out. - * In order to prevent this issue when verification fails with a retriable error (ie. NOT_COORDINATOR), - * the VerificationStateEntry maintains the lowest sequence number it sees and blocks higher sequences from being - * written to the log. However, if we encounter a new and lower sequence when verifying, we want to block sequences - * higher than that new sequence. Additionally, if the epoch is bumped, the sequence is reset and any previous - * sequence must be disregarded. + * An OutOfOrderSequence loop can happen for any idempotent/transactional producer when a lower sequence fails with + * a retriable error and a higher sequence is successfully written.The lower sequence will fail with + * OutOfOrderSequence and retry until retries run out. + * + * Here, we keep the lowest sequence seen in order to prevent an OutOfOrderSequence loop when verifying. (This does Review Comment: nit: I would remove the `()`. ########## storage/src/main/java/org/apache/kafka/storage/internals/log/VerificationStateEntry.java: ########## @@ -58,14 +58,16 @@ public short epoch() { } /** - * We keep the lowest sequence seen in order to prevent an OutOfOrderSequence loop. This occurs in idempotent - * producers when a lower sequence fails with a retriable error and a higher sequence is successfully written. - * The lower sequence will fail with OutOfOrderSequence and retry until retries run out. - * In order to prevent this issue when verification fails with a retriable error (ie. NOT_COORDINATOR), - * the VerificationStateEntry maintains the lowest sequence number it sees and blocks higher sequences from being - * written to the log. However, if we encounter a new and lower sequence when verifying, we want to block sequences - * higher than that new sequence. Additionally, if the epoch is bumped, the sequence is reset and any previous - * sequence must be disregarded. + * An OutOfOrderSequence loop can happen for any idempotent/transactional producer when a lower sequence fails with + * a retriable error and a higher sequence is successfully written.The lower sequence will fail with Review Comment: nit: Missing space before `The`. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org