lhotari commented on code in PR #23204:
URL: https://github.com/apache/pulsar/pull/23204#discussion_r1904504279


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -777,19 +747,7 @@ public void asyncAddEntry(final byte[] data, int 
numberOfMessages, int offset, i
 
     @Override
     public void asyncAddEntry(ByteBuf buffer, AddEntryCallback callback, 
Object ctx) {
-        if (log.isDebugEnabled()) {
-            log.debug("[{}] asyncAddEntry size={} state={}", name, 
buffer.readableBytes(), state);
-        }
-
-        // retain buffer in this thread
-        buffer.retain();
-
-        // Jump to specific thread to avoid contention from writers writing 
from different threads
-        executor.execute(() -> {
-            OpAddEntry addOperation = OpAddEntry.createNoRetainBuffer(this, 
buffer, callback, ctx,
-                    currentLedgerTimeoutTriggered);
-            internalAsyncAddEntry(addOperation);
-        });
+        asyncAddEntry(buffer, 1, callback, ctx);

Review Comment:
   @shibd Please report an issue to track this. It seems that there are 
untested and undocumented behaviors in the original implementation that aren't 
tested if this change was possible.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to