dragosvictor commented on code in PR #21854:
URL: https://github.com/apache/pulsar/pull/21854#discussion_r1445060830


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1870,10 +1872,14 @@ protected void handleAck(CommandAck ack) {
             Consumer consumer = consumerFuture.getNow(null);
             Subscription subscription = consumer.getSubscription();
             if (subscription.getTopic().isTransferring()) {
+                PulsarService pulsar = getBrokerService().getPulsar();
                 // Message acks are silently ignored during topic transfer.
+                long ignoredAckCount = ack.getMessageIdsCount();
+                var ignoredAckTotalCount = 
ExtensibleLoadManagerImpl.get(pulsar).getIgnoredAckCount().

Review Comment:
   No functional reason to do so, the topic transferring flag can only be set 
when the Extensible Load Manager is enabled. 
   
   I like the idea though, how about an assertion instead? A comment would work 
too, but an assertion can help us catch any code regressions. cc @heesung-sn
   
   ```suggestion
                   assert ExtensibleLoadManagerImpl.isEnabled(pulsar);
                   var ignoredAckTotalCount = 
ExtensibleLoadManagerImpl.get(pulsar).getIgnoredAckCount().
   ```



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