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

   @graysonzeng After spending more time with this issue, here are my 
suggestions to fix the issue:
   * make `sendAddSuccessCallbacks` method `synchronized`. 
   * make `changingEnsemble` field `volatile`
   * change line 204 in `PendingAddOp` to 
`lh.executeOrdered(lh::sendAddSuccessCallbacks);` to prevent the deadlock
   * add logic to `drainPendingAddsAndAdjustLength` method to update 
`pendingAddsSequenceHead` accordingly. That's the only way how 
`pendingAddsSequenceHead` could currently get out of sync.
   


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