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 2020/06/08 01:19:40 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #7164: fix get partitioned metadata throws NullPointerException

sijie commented on a change in pull request #7164:
URL: https://github.com/apache/pulsar/pull/7164#discussion_r436421730



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -1918,6 +1918,9 @@ private void createPendingLoadTopic() {
     }
 
     public CompletableFuture<PartitionedTopicMetadata> fetchPartitionedTopicMetadataCheckAllowAutoCreationAsync(TopicName topicName) {
+        if(pulsar.getNamespaceService() == null){
+            return FutureUtil.failedFuture(new NullPointerException("namespaceService is null"));

Review comment:
       I think we should return an explicit error to tell the application that the namespace service is not ready.




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