Jason918 commented on code in PR #21265:
URL: https://github.com/apache/pulsar/pull/21265#discussion_r1339716083


##########
pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java:
##########
@@ -126,17 +126,12 @@ public void channelRead(ChannelHandlerContext ctx, Object 
msg) throws Exception
             }
             messageReceived();
 
+            safeInterceptCommand(cmd);
+
             switch (cmd.getType()) {
             case PARTITIONED_METADATA:
                 checkArgument(cmd.hasPartitionMetadata());
-                try {
-                    interceptCommand(cmd);
-                    handlePartitionMetadataRequest(cmd.getPartitionMetadata());
-                } catch (InterceptException e) {
-                    writeAndFlush(ctx,
-                            
Commands.newPartitionMetadataResponse(getServerError(e.getErrorCode()),
-                            e.getMessage(), 
cmd.getPartitionMetadata().getRequestId()));
-                }
+                handlePartitionMetadataRequest(cmd.getPartitionMetadata());

Review Comment:
   This is a behavior change if `InterceptException` is thrown from 
`interceptCommand`. This may cause client stuck if it can't get the error.



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