michaeljmarshall commented on code in PR #19446:
URL: https://github.com/apache/pulsar/pull/19446#discussion_r1098296385
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1622,6 +1625,14 @@ protected void handleSend(CommandSend send, ByteBuf
headersAndPayload) {
CompletableFuture<Producer> producerFuture =
producers.get(send.getProducerId());
if (producerFuture == null || !producerFuture.isDone() ||
producerFuture.isCompletedExceptionally()) {
+ if (recentlyClosedProducers.containsKey(send.getProducerId())) {
Review Comment:
The send command does not have the producer's epoch, so we don't have that
information in scope.
It could be valuable to discuss ways to improve the protocol for the future,
like asking if the send command should have the epoch or some other identifier,
but I want a backwards compatible solution that will work by upgrading the
broker.
Also, I considered comparing epoch's when the `Producer` command is handled
in another part of this PR, but I think it complicates the logic more than
necessary, so we ignore the value then too.
The primary reason for keeping using the epoch value is to make sure the
scheduled task does not remove the wrong key.
--
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]