coderzc commented on code in PR #25048:
URL: https://github.com/apache/pulsar/pull/25048#discussion_r2602370609


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1730,12 +1730,8 @@ protected void handleProducer(final CommandProducer 
cmdProducer) {
                                     
BrokerServiceException.getClientErrorCode(exception),
                                     message);
                         }
-                        var cause = 
FutureUtil.unwrapCompletionException(exception);
-                        if (!(cause instanceof IncompatibleSchemaException)) {
-                            log.error("Try add schema failed, remote address 
{}, topic {}, producerId {}",
-                                    remoteAddress,
-                                    topicName, producerId, exception);
-                        }
+                        log.warn("Try add schema failed, remote address {}, 
topic {}, producerId {}",

Review Comment:
   If `IncompatibleSchemaException` can be ignored, then what about 
`InvalidSchemaDataException`? Does it also need to be ignored?
   
   e.g
   ```java
   
org.apache.pulsar.broker.service.schema.exceptions.InvalidSchemaDataException: 
Invalid schema definition data for PROTOBUF schema
        at 
org.apache.pulsar.broker.service.schema.validator.StructSchemaDataValidator.throwInvalidSchemaDataException(StructSchemaDataValidator.java:98)
        at 
org.apache.pulsar.broker.service.schema.validator.StructSchemaDataValidator.validate(StructSchemaDataValidator.java:69)
        at 
org.apache.pulsar.broker.service.schema.validator.SchemaDataValidator.validateSchemaData(SchemaDataValidator.java:46)
        at 
org.apache.pulsar.broker.service.schema.validator.SchemaRegistryServiceWithSchemaDataValidator.putSchemaIfAbsent(SchemaRegistryServiceWithSchemaDataValidator.java:92)
        at 
org.apache.pulsar.broker.service.AbstractTopic.addSchema(AbstractTopic.java:729)
        at 
org.apache.pulsar.broker.service.ServerCnx.tryAddSchema(ServerCnx.java:3185)
        at 
org.apache.pulsar.broker.service.ServerCnx.lambda$handleProducer$32(ServerCnx.java:1721)
   ```



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