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 2022/07/05 04:01:16 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16390: [fix][broker] Fix RawReader out of order

codelipenghui commented on code in PR #16390:
URL: https://github.com/apache/pulsar/pull/16390#discussion_r913367052


##########
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java:
##########
@@ -213,7 +213,7 @@ void messageReceived(CommandMessage commandMessage, ByteBuf headersAndPayload, C
             }
             incomingRawMessages.add(
                     new RawMessageAndCnx(new RawMessageImpl(messageId, headersAndPayload), cnx));
-            tryCompletePending();
+            internalPinnedExecutor.execute(this::tryCompletePending);

Review Comment:
   Is it better to also run lines 214-215 in the internalPinnedExecutor? So that the IO thread only has 1 time add queue operation. Currently, the IO thread will have 2 add queue operations.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org