lhotari commented on code in PR #20540:
URL: https://github.com/apache/pulsar/pull/20540#discussion_r1447078219


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -2264,18 +2315,8 @@ private Optional<CompletableFuture<Optional<Topic>>> 
findTopicFutureInCache(Topi
         }
     }
 
-    private CompletableFuture<Void> removeTopicFutureFromCache(String topic,
-                                                        
CompletableFuture<Optional<Topic>> createTopicFuture) {
-        TopicName topicName = TopicName.get(topic);
-        return pulsar.getNamespaceService().getBundleAsync(topicName)
-                .thenAccept(namespaceBundle -> {
-                    removeTopicFromCache(topic, namespaceBundle, 
createTopicFuture);
-                });
-    }
-
-    private void removeTopicFromCache(String topic, NamespaceBundle 
namespaceBundle,
-                                     CompletableFuture<Optional<Topic>> 
createTopicFuture) {
-        String bundleName = namespaceBundle.toString();
+    private void removeTopicFromCache(String topic,
+                                      String bundleName, 
CompletableFuture<Optional<Topic>> createTopicFuture) {

Review Comment:
   I agree that keeping types would make sense. In this case, there was already 
`String topic` so I thought that it's more consistent to use String also for 
the namespace bundle. We could also take it to another direction. :)



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