lhotari opened a new pull request, #4175: URL: https://github.com/apache/bookkeeper/pull/4175
### Motivation There's a race condition in LedgerHandle between drainPendingAddsAndAdjustLength & sendAddSuccessCallbacks method calls. The methods could get called simultaneously which would cause inconsistency. The changingEnsemble field has a thread safety issue and the changes might not be visible to the reading thread. ### Changes - use `synchronized (pendingAddOps)` as the object monitor for serializing drainPendingAddsAndAdjustLength & sendAddSuccessCallbacks method calls. - make changingEnsemble field volatile - remove the too strict rule for pendingAddsSequenceHead which breaks things after failures ### Additional Context - this is an alternative fix for https://github.com/apache/pulsar/issues/21860 - the other fix is #4171 -- 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]
