rdhabalia commented on code in PR #16425:
URL: https://github.com/apache/pulsar/pull/16425#discussion_r933926141


##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java:
##########
@@ -227,17 +316,28 @@ public final CompletableFuture<Void> delete(String path, 
Optional<Long> expected
         if (!isValidPath(path)) {
             return FutureUtil.failedFuture(new 
MetadataStoreException.InvalidPathException(path));
         }
+        if (getMetadataEventSynchronizer().isPresent()) {
+            MetadataEvent event = new MetadataEvent(path, null, new 
HashSet<>(),
+                    expectedVersion.orElse(null), Instant.now().toEpochMilli(),
+                    getMetadataEventSynchronizer().get().getClusterName(), 
NotificationType.Deleted);
+            return getMetadataEventSynchronizer().get().notify(event)

Review Comment:
   Yes, that was the idea to use Topic is a WAL and it's doing the same thing 
along with managing API compatibility.
   We are building a generic solution for metadata-store which is used for 
local metadata store as well and these APIs expect response in the same session 
the and can't depend on message processing by the another broker. It also has 
to maintain the API compatibility. Therefore, it processes the request and also 
publish a message which will be eventually be processed and consistent across 
all the clusters.  So, it gives guarantee to have eventual consistency as all 
the clusters including local cluster who is going to publish will also process 
the message.
   We have gone through the life cycle of this behavior and it should work 
without doing any compromise or having inconsistency. In fact, this behavior is 
also documented in PIP.



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