sijie commented on a change in pull request #5942: Avoid using same OpAddEntry
between different ledger handles
URL: https://github.com/apache/pulsar/pull/5942#discussion_r362297453
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -553,13 +553,12 @@ public void asyncAddEntry(ByteBuf buffer,
AddEntryCallback callback, Object ctx)
// Jump to specific thread to avoid contention from writers writing
from different threads
executor.executeOrdered(name, safeRun(() -> {
- pendingAddEntries.add(addOperation);
-
internalAsyncAddEntry(addOperation);
}));
}
private synchronized void internalAsyncAddEntry(OpAddEntry addOperation) {
+ pendingAddEntries.add(addOperation);
Review comment:
The root cause of #5588 is an entry is "re-used" between ledgers. The code
at line 1297 is the fix.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services