wchevreuil commented on a change in pull request #29:
URL: https://github.com/apache/hbase-filesystem/pull/29#discussion_r747565792



##########
File path: 
hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/sync/TreeLockManager.java
##########
@@ -488,7 +488,18 @@ public void close() throws IOException {
         try {
           writeUnlock(src);
         } finally {
-          writeUnlock(dst);
+          try {
+            writeUnlock(dst);
+          } finally {
+            // Tricky... HBossContract tests tough things like
+            //   `rename("/", "/somethingelse")`
+            // This means we grabbed write locks on
+            //    /               (src)
+            //    /somethingelse  (dst)
+            // Thus, we can't safely delete the znodes for src as it may
+            // then also affect the (held) lock on the dst.
+            recursiveDelete(src);

Review comment:
       I think it's ok to delete it. The only con is that anyone trying to 
access it again would then recreate the znode in writeLock()/readLock().




-- 
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: issues-unsubscr...@hbase.apache.org

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


Reply via email to