Denovo1998 commented on code in PR #26109:
URL: https://github.com/apache/pulsar/pull/26109#discussion_r3499081353


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java:
##########
@@ -223,13 +226,35 @@ private void 
receiveSubscriptionUpdated(ReplicatedSubscriptionsUpdate update) {
                     .log("Creating subscription at: after receiving update 
from replicated subscription");
             topic.createSubscription(update.getSubscriptionName(), 
InitialPosition.Earliest,
                             true /* replicateSubscriptionState */, 
Collections.emptyMap())
-                    .thenAccept(subscriptionCreated -> {
-                        
subscriptionCreated.acknowledgeMessageAsync(Collections.singletonList(pos),
-                                AckType.Cumulative, Collections.emptyMap());
+                    .thenAccept(subscriptionCreated ->

Review Comment:
   Thanks for pointing this out. I added 
testReplicatedSubscriptionUpdateCreatedSubscriptionAckFutureIsObserved to cover 
the create-then-ack path: topic.getSubscription(...) returns null, 
createSubscription(...) completes with the newly-created subscription, and the 
ack future returned by that subscription is asserted to be observed.



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

Reply via email to