lianetm opened a new pull request, #23008:
URL: https://github.com/apache/kafka/pull/23008

   This PR includes the following fixes to avoid closing the wrong batch when a 
mid-batch extension acquire fails on an exhausted pool:
   
   - close the batch only if it's the same we were trying to extend. If it's 
not, do not close it and continue the loop, so the next iteration checks 
against whatever is open then (will take the new-batch path if nothing is open, 
or retry with the new open batch, sizing the extension needed again)
   - bound the retries the above introduces. With nothing closed, the append 
comes back to the same acquire, which never blocks and so never spends 
max.block.ms. Fix by always allowing a first attempt (it's non-blocking), but 
bound retries against the remaining max.block.ms. Edge case to ensure send does 
not exceed max.block.ms when the extension keeps failing with the batch being 
replaced.
   - track an absolute deadline, so both the blocking and the non-blocking 
retries count against max.block.ms
   


-- 
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]

Reply via email to