mattisonchao commented on code in PR #19242:
URL: https://github.com/apache/pulsar/pull/19242#discussion_r1071595107


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/GeoPersistentReplicator.java:
##########
@@ -184,12 +183,20 @@ protected boolean replicateEntries(List<Entry> entries) {
                     msg.setSchemaInfoForReplicator(schemaFuture.get());
                     msg.getMessageBuilder().clearTxnidMostBits();
                     msg.getMessageBuilder().clearTxnidLeastBits();
+                    // Increment pending messages for messages produced locally
+                    PENDING_MESSAGES_UPDATER.incrementAndGet(this);
+                    shouldRollbackPendingSendAdd.setTrue();
                     producer.sendAsync(msg, ProducerSendCallback.create(this, 
entry, msg));

Review Comment:
   Why do we need `shouldRollbackPendingSendAdd`? Is `producer.sendAsync(msg, 
ProducerSendCallback.create(this, entry, msg))` throws exception?



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to