devinbost opened a new pull request #10583: URL: https://github.com/apache/pulsar/pull/10583
I noticed that OpAddEntry.safeRun() is modifying a volatile field (`ml.lastConfirmedEntry`) here: https://github.com/apache/pulsar/blob/55d6a77ec8e7d05f00f906111b7de63d6b52c74a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java#L197 Since we don't have a mutex while updating `lastConfirmedEntry`, it looks like that could create a concurrency issue if another thread races on the update. I found this while investigating #6054, though testing confirmed that this PR doesn't prevent the `lastConfirmedEntry` from getting stuck in that issue (as reported in this comment: https://github.com/apache/pulsar/issues/6054#issuecomment-840894974). -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org