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 2021/02/03 09:26:49 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #9202: PIP 76: Streaming Offload(Part II)

315157973 commented on a change in pull request #9202:
URL: https://github.com/apache/pulsar/pull/9202#discussion_r569255887



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -780,12 +1088,99 @@ private boolean beforeAddEntry(OpAddEntry addOperation) {
         }
     }
 
+    /**
+     * This method should not block the thread, if the buffer is full then use another runnable to fill data
+     * when buffer available.
+     *
+     * @param addOperation
+     */
+    protected synchronized void addToOffload(OpAddEntry addOperation) {

Review comment:
       If it is just to initialize offloadEntryFillTask, double check lock can be used to avoid locking every time




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