eolivelli commented on pull request #10215:
URL: https://github.com/apache/pulsar/pull/10215#issuecomment-819265871


   @lhotari please check the answer from @merlimat 
   https://github.com/apache/pulsar/issues/10210#issuecomment-819086592
   
   Probably this is the minimal fix we can do in ClientCtx, that is to eagerly 
initialize all of the fields:
   
   ```
   @Override
       protected void handleGetSchemaResponse(CommandGetSchemaResponse 
commandGetSchemaResponse) {
           checkArgument(state == State.Ready);
   
           long requestId = commandGetSchemaResponse.getRequestId();
           commandGetSchemaResponse.getSchema().getSchemaData();
           commandGetSchemaResponse.getSchema().getName();
           commandGetSchemaResponse.getSchema().getPropertiesList()
           commandGetSchemaResponse.getSchema().getType();
           CompletableFuture<CommandGetSchemaResponse> future = 
(CompletableFuture<CommandGetSchemaResponse>) pendingRequests
                   .remove(requestId);
           if (future == null) {
               log.warn("{} Received unknown request id from server: {}", 
ctx.channel(), requestId);
               return;
           }
           future.complete(commandGetSchemaResponse);
       }
   ```


-- 
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:
[email protected]


Reply via email to