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 2021/04/16 15:46:35 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #10248: Java Client: MessageImpl - ensure that AutoConsumeSchema downloaded the schema before decoding the payload

eolivelli commented on a change in pull request #10248:
URL: https://github.com/apache/pulsar/pull/10248#discussion_r614942131



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -1707,9 +1707,15 @@ protected void handleGetTopicsOfNamespace(CommandGetTopicsOfNamespace commandGet
     @Override
     protected void handleGetSchema(CommandGetSchema commandGetSchema) {
         if (log.isDebugEnabled()) {
-            log.debug("Received CommandGetSchema call from {}, schemaVersion: {}, topic: {}, requestId: {}",
-                    remoteAddress, new String(commandGetSchema.getSchemaVersion()),
-                    commandGetSchema.getTopic(), commandGetSchema.getRequestId());
+            if (commandGetSchema.hasSchemaVersion()) {
+                log.debug("Received CommandGetSchema call from {}, schemaVersion: {}, topic: {}, requestId: {}",

Review comment:
       when you enable debug in the broker you see getSchema() does not work due to an error while calling getSchemaVersion() when hasSchemaVersion() returns false.
   I added here the fix




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

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