merlimat commented on a change in pull request #13394:
URL: https://github.com/apache/pulsar/pull/13394#discussion_r772533776



##########
File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/BaseResources.java
##########
@@ -152,6 +152,20 @@ protected void delete(String path) throws 
MetadataStoreException {
         return cache.delete(path);
     }
 
+    protected CompletableFuture<Void> deleteIfExistsAsync(String path) {
+        CompletableFuture<Void> future = new CompletableFuture<>();
+        cache.delete(path).whenComplete((ignore, ex) -> {

Review comment:
       👍 We could also do a check for `exists()` before the delete.




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