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/11/08 08:57:22 UTC

[GitHub] [pulsar] leizhiyuan commented on issue #18384: [Bug] if writeAndFlush failed , we will get a message hole

leizhiyuan commented on issue #18384:
URL: https://github.com/apache/pulsar/issues/18384#issuecomment-1306854707

   ```
      Future<Void> writeAndFlushPromise =
                   cnx.getCommandSender().sendMessagesToConsumer(consumerId, topicName, subscription, partitionIdx,
                           entries, batchSizes, batchIndexesAcks, redeliveryTracker, epoch);
           writeAndFlushPromise.addListener(status -> {
               // only increment counters after the messages have been successfully written to the TCP/IP connection
               if (status.isSuccess()) {
                   msgOut.recordMultipleEvents(totalMessages, totalBytes);
                   msgOutCounter.add(totalMessages);
                   bytesOutCounter.add(totalBytes);
                   chunkedMessageRate.recordMultipleEvents(totalChunkedMessages, 0);
               }
           });
   maybe this write fail
   ```


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