File tree Expand file tree Collapse file tree
pulsar-broker/src/main/java/org/apache/pulsar/broker/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1233,10 +1233,19 @@ protected void handlePartitionMetadataRequest(CommandPartitionedTopicMetadata pa
12331233 topicExistsInfo .recycle ();
12341234 }).exceptionally (ex -> {
12351235 lookupSemaphore .release ();
1236- log .error ()
1237- .attr ("topic" , topicName )
1238- .exception (ex )
1239- .log ("Failed to get partition metadata" );
1236+ Throwable actEx = FutureUtil .unwrapCompletionException (ex );
1237+ if (actEx instanceof WebApplicationException restException
1238+ && restException .getResponse ().getStatus () == NOT_FOUND .getStatusCode ()) {
1239+ log .warn ()
1240+ .attr ("topic" , topicName )
1241+ .exceptionMessage (actEx )
1242+ .log ("Failed to get partition metadata for nonexistent resource" );
1243+ } else {
1244+ log .error ()
1245+ .attr ("topic" , topicName )
1246+ .exception (ex )
1247+ .log ("Failed to get partition metadata" );
1248+ }
12401249 writeAndFlush (
12411250 Commands .newPartitionMetadataResponse (ServerError .MetadataError ,
12421251 "Failed to get partition metadata" ,
You can’t perform that action at this time.
0 commit comments