Shekharrajak opened a new pull request, #22571: URL: https://github.com/apache/kafka/pull/22571
Fixes a silent test-coverage hole in PersisterStateBatchCombinerTest, corrects one wrong expected output it exposed, and removes a few hot-path allocations in PersisterStateBatchCombiner. Corrected the expectedResult for the "Handle overlapping batches in newBatches, same state" case to include the trailing (124..130, 0, 1) range the algorithm correctly emits. No output change. Updated for the improvements and more tests : pruneBatches short-circuits when startOffset == -1 or the list is empty. getMergeCandidatePair reuses a single ArrayList buffer instead of allocating a LinkedList per call; uses bulk removeAll. mergeBatches caches compareBatchDeliveryInfo(candidate, prev) into a local instead of recomputing. -- 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]
