lhotari commented on a change in pull request #14602:
URL: https://github.com/apache/pulsar/pull/14602#discussion_r822610771
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -115,7 +116,8 @@
private volatile long producerDeadline = 0; // gets set on first
successful connection
private final BatchMessageContainerBase batchMessageContainer;
- private CompletableFuture<MessageId> lastSendFuture =
CompletableFuture.completedFuture(null);
Review comment:
I think it would be worth reverting the changes that remove that
lastSendFuture field.
The LastSendFutureWrapper field could co-exist with lastSendFuture field. In
flushAsync, the code would first check if the future inside the
lastSendFutureWrapper.lastSendFuture == lastSendFuture. If it's not, it would
create a new lastSendFutureWrapper instance. This would reduce the overhead of
the solution to minimum.
--
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]