shibd commented on code in PR #22860: URL: https://github.com/apache/pulsar/pull/22860#discussion_r1629707745
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java: ########## @@ -1283,7 +1288,7 @@ private CompletableFuture<Optional<Topic>> createNonPersistentTopic(String topic }).exceptionally(ex -> { log.warn("Replication check failed. Removing topic from topics list {}, {}", topic, ex.getCause()); nonPersistentTopic.stopReplProducers().whenComplete((v, exception) -> { - pulsar.getExecutor().execute(() -> topics.remove(topic, topicFuture)); + pulsar.getExecutor().execute(() -> topics.remove(topic)); Review Comment: > In the past there have been races which has been resolved by removing a specific value. We should ensure that this change doesn't cause regressions. I don't think there should be any regressions now because previously, calling 'remove' at the start of 'getTopic' led to a race condition. https://github.com/apache/pulsar/blob/400a286ca09d4f45f388616fd996f0605f19e5a4/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L1011-L1012 Do you remember the previous PR? I'll see if there's a unit test to cover it and I can verify it. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org