hachikuji opened a new pull request, #12922: URL: https://github.com/apache/kafka/pull/12922
When a batch is failed after reaching its delivery timeout, we do not necessarily know whether the broker actually committed it to disk. For example, in the case of a `REQUEST_TIMEOUT` error, it is possible the leader wrote the batch locally, but failed to commit it to the ISR before expiration of the timeout. Later that batch could still become committed. In this case, the producer should not adjust the sequence numbers of subsequent batches until we know whether or not they could also have become committed. Prior to this patch, had logic to handle this case when the retry limit was reached, but we did not update it to account for delivery timeouts as well. This patch fixes the issue and tries to improve test coverage. Note this bug was caught by the new tests added in https://github.com/apache/kafka/pull/12873. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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