shustsud commented on PR #4194:
URL: https://github.com/apache/bookkeeper/pull/4194#issuecomment-1940387403

   @lhotari 
   I see.
   
   The cause of this issue is the following call to 
LedgerHandle#sendAddSuccessCallbacks.
   
https://github.com/apache/bookkeeper/blob/234b817cdb4e054887ffd5e42eaed25dc02daf63/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java#L203-L206
   
   If LedgerHandle#sendAddSuccessCallbacks is called at this timing, it may 
cause other entries that need to be written again to the Bookies to complete. 
Therefore, LedgerHandle#sendAddSuccessCallbacks must be called after all 
entries have been written again to Bookies.
   
   Also, while writing again to Bookies, LedgerHandle#sendAddSuccessCallbacks 
may be called in other threads. This point needs to be fixed and may overlap 
with the PR https://github.com/apache/bookkeeper/pull/4171.
   
https://github.com/apache/bookkeeper/blob/13e7efaa971cd3613b065ac50836c5ee98985d13/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java#L2008-L2012
   
   In this fix, changing the timing of setting changingEnsemble to false may 
solve the issue.
   
https://github.com/apache/bookkeeper/blob/13e7efaa971cd3613b065ac50836c5ee98985d13/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java#L1997


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