You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/14 02:07:31 UTC

[GitHub] [pulsar] Demogorgon314 commented on a change in pull request #14196: [Broker] Change broker producer fence log level

Demogorgon314 commented on a change in pull request #14196:
URL: https://github.com/apache/pulsar/pull/14196#discussion_r805460138



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -1353,8 +1353,15 @@ private void buildProducerAndAddTopic(Topic topic, long producerId, String produ
 
             producers.remove(producerId, producerFuture);
         }).exceptionally(ex -> {
-            log.error("[{}] Failed to add producer to topic {}: producerId={}, {}",
-                    remoteAddress, topicName, producerId, ex.getMessage());
+            if (ex.getCause() instanceof BrokerServiceException.ProducerFencedException) {
+                if (log.isDebugEnabled()) {
+                    log.debug("[{}] Failed to add producer to topic {}: producerId={}, {}",
+                            remoteAddress, topicName, producerId, ex.getMessage());
+                }
+            } else {
+                log.warn("[{}] Failed to add producer to topic {}: producerId={}, {}",

Review comment:
       I see consume `handleSubscribe` are using warn log, should we change to error too? https://github.com/apache/pulsar/blob/e220e7934654bf8ce673ce447810455e27cfc282/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L1083




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org