You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/12/31 18:44:59 UTC

[GitHub] [pulsar] rdhabalia commented on a change in pull request #5942: Avoid using same OpAddEntry between different ledger handles

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

 ##########
 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:
   Is this real root cause of #5588 or it just a patch to avoid such behavior?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services