lhotari commented on PR #4171: URL: https://github.com/apache/bookkeeper/pull/4171#issuecomment-1886497038
> The sendAddSuccessCallbacks method has no input parameters, which means that assuming both threads want to call it, the execution result will be the same no matter which thread triggers it. Therefore there is no need to execute an additional loop @graysonzeng I added another comment https://github.com/apache/bookkeeper/pull/4171#issuecomment-1886440245 where I explain the problem. I think that this line should be changed to use the ordered executor: https://github.com/apache/bookkeeper/blob/234b817cdb4e054887ffd5e42eaed25dc02daf63/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java#L204 ``` lh.executeOrdered(lh::sendAddSuccessCallbacks); ``` And then sendAddSuccessCallbacks could be made a synchronized method. That would prevent the dead lock seen in https://github.com/apache/bookkeeper/pull/4171#issuecomment-1886240623 . Makes sense? -- 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]
