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 2021/09/01 09:12:22 UTC

[GitHub] [pulsar] merlimat opened a new pull request #11867: Added MetadataStore deleteRecursive operation

merlimat opened a new pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867


   ### Motivation
   
   There are several cases in which the recursive deletion of metadata is done in the code base. Instead we should just have a single implementation, directly in the MetadataStore API.


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] hangc0276 commented on a change in pull request #11867: Added MetadataStore deleteRecursive operation

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on a change in pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867#discussion_r700086760



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/MetadataStoreTest.java
##########
@@ -300,4 +300,30 @@ public void notificationListeners(String provider, String url) throws Exception
         assertEquals(n.getType(), NotificationType.ChildrenChanged);
         assertEquals(n.getPath(), key1);
     }
+
+    @Test(dataProvider = "impl")

Review comment:
       Should we add Timeout for this test? the `join()` operation will wait until completed, which may block the test




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #11867: Added MetadataStore deleteRecursive operation

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867#discussion_r699667948



##########
File path: pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStore.java
##########
@@ -112,6 +112,15 @@
      */
     CompletableFuture<Void> delete(String path, Optional<Long> expectedVersion);
 
+    /**
+     * Delete a key-value pair and all the children nodes

Review comment:
       Shall we add a specification that in case of failure the result of the operation is undetermined?
   We are not using a single transaction in zk and so the deletion may be partial 




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #11867: Added MetadataStore deleteRecursive operation

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867#discussion_r700445608



##########
File path: pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStore.java
##########
@@ -112,6 +112,15 @@
      */
     CompletableFuture<Void> delete(String path, Optional<Long> expectedVersion);
 
+    /**
+     * Delete a key-value pair and all the children nodes

Review comment:
       Good point, let me update the javadoc




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #11867: Added MetadataStore deleteRecursive operation

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867#discussion_r699667948



##########
File path: pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStore.java
##########
@@ -112,6 +112,15 @@
      */
     CompletableFuture<Void> delete(String path, Optional<Long> expectedVersion);
 
+    /**
+     * Delete a key-value pair and all the children nodes

Review comment:
       Shall we add a specification that in case of failure the result of the operation is undetermined?
   We are not using a single transaction in zk and so the deletion may be partial 




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #11867: Added MetadataStore deleteRecursive operation

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867#discussion_r700445165



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/MetadataStoreTest.java
##########
@@ -300,4 +300,30 @@ public void notificationListeners(String provider, String url) throws Exception
         assertEquals(n.getType(), NotificationType.ChildrenChanged);
         assertEquals(n.getPath(), key1);
     }
+
+    @Test(dataProvider = "impl")

Review comment:
       All tests have already a default timeout of 5min if not specified.




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #11867: Added MetadataStore deleteRecursive operation

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #11867:
URL: https://github.com/apache/pulsar/pull/11867


   


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org