frankvicky commented on code in PR #23663:
URL: https://github.com/apache/kafka/pull/23663#discussion_r4156460077
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TxnPartitionEntry.java:
##########
@@ -133,7 +171,17 @@ int maybeUpdateLastAckedSequence(int sequence) {
}
void removeInFlightBatch(ProducerBatch batch) {
- inflightBatchesBySequence.remove(batch);
+ if (!inflightBatchesBySequence.remove(batch)) {
+ return;
+ }
+ if (!inflightBatchesBySequence.isEmpty()
+ && batch.baseSequence() >
inflightBatchesBySequence.first().baseSequence()) {
Review Comment:
This is a existing limitation and not introduced by this PR.
I would rather keep this consistent with the surrounding code, if we want to
address this would be good to do it for the whole of `TxnPartitionEntry` in a
new ticket.
--
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]