heesung-sn commented on code in PR #21682:
URL: https://github.com/apache/pulsar/pull/21682#discussion_r1423048556


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -439,6 +444,15 @@ public CompletableFuture<Void> messageAcked(CommandAck 
ack) {
                 .collect(Collectors.toMap(KeyLongValue::getKey, 
KeyLongValue::getValue));
         }
 
+        if (subscription.isTransferring()) {
+            if (log.isDebugEnabled()) {
+                log.debug("[{}] [{}] Ignoring message acknowledgement on 
transferring topic, ack(s) count: {}",
+                        subscription, consumerId, ack.getMessageIdsCount());
+            }
+            return FutureUtil.failedFuture(new 
BrokerServiceException.TopicTransferringException(

Review Comment:
   I am worried about the performance impact here, as throwing an exception 
needs to capture stacks. Can we complete the future without throwing this 
exception?  Or could you make this exception light-weight? For example disable 
`fillInStackTrace` and other metadata collections.



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