Renkai commented on a change in pull request #9202:
URL: https://github.com/apache/pulsar/pull/9202#discussion_r569207789
##########
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 (offloadEntryFillTask == null || offloadEntryFillTask.isDone())` may
have race condition.
----------------------------------------------------------------
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]