chia7712 commented on PR #17319:
URL: https://github.com/apache/kafka/pull/17319#issuecomment-2400101110

   > When a block allocate() is signaled by other thread's deallocate() call 
([BufferPool.java#L273-L275](https://github.com/apache/kafka/blob/2c85b113321fa14349a613cd6f22da10670235f9/clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java#L273-L275)),
 it still re-enter the the while loop until hits the block timeout. 
([BufferPool.java#L148-L153](https://github.com/apache/kafka/blob/2c85b113321fa14349a613cd6f22da10670235f9/clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java#L148-L153))
   I won't say the deallcoate is a no-op in this test, but the orignal test 
name is not accurate.
   
   I don't think this test case has actually tested this behavior, which is why 
I believe the deallocate is a no-op, as the related behavior isn't asserted in 
the test.
   
   > I can split the test into 2 tests as you suggested previously. Split the 
testBlockTimeout() into below tests:
   
   Perhaps this PR can simplify the test case to address the flakiness, and 
then you can file a follow-up to add more test cases.


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