graysonzeng commented on PR #4171:
URL: https://github.com/apache/bookkeeper/pull/4171#issuecomment-1886647231

   > The logic in `sendAddSuccessCallbacks` in master branch feels wrong. The 
logic gets stuck if the call to sendAddSuccessCallbacks is missed or out of 
order. Calling the method multiple times won't help once the head of the queue 
is out of sync since removing entries requires that the head of the queue has 
`pendingAddOp.entryId == pendingAddsSequenceHead + 1`. @eolivelli Do you have a 
chance to help with this challenge?
   
   I agree with your comment. In fact, this comment exactly answers the reason 
for the problem.  when the method is called multiple times at the same 
time,missed or out of order will happen in pendingAddOp.  `pendingAddOp.entryId 
== pendingAddsSequenceHead + 1`  condition prevents it from continuing to 
execute.  The heap dump of the broker confirms this
   
   
![image](https://github.com/apache/bookkeeper/assets/21187269/c9f28352-7d9f-4f89-8170-6dc88c177fe7)
   
   In a ledgerHanle instance, we can see the peek pendingAddOp entryId is 
224113,it is not it is not equal to pendingAddsSequenceHead 224111
   
   


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