You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/02/11 08:07:13 UTC

[GitHub] [accumulo] ctubbsii opened a new pull request #1926: Fix incorrect sorting of ZooLock child nodes

ctubbsii opened a new pull request #1926:
URL: https://github.com/apache/accumulo/pull/1926


   * Take into account the new UUID scheme when sorting ZooLock child nodes
   * Fix BackupManagerIT missing slash in path to lock node


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

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



[GitHub] [accumulo] brianloss commented on a change in pull request #1926: Fix incorrect sorting of ZooLock child nodes

Posted by GitBox <gi...@apache.org>.
brianloss commented on a change in pull request #1926:
URL: https://github.com/apache/accumulo/pull/1926#discussion_r574462028



##########
File path: test/src/main/java/org/apache/accumulo/test/functional/BackupManagerIT.java
##########
@@ -52,13 +52,13 @@ public void test() throws Exception {
       // wait for 2 lock entries
       do {
         UtilWaitThread.sleep(100);
-        children = writer.getChildren(root + Constants.ZMANAGER_LOCK);
+        String path = root + Constants.ZMANAGER_LOCK;
+        children = ZooLock.validateAndSortChildrenByLockPrefix(path, writer.getChildren(path));
       } while (children.size() != 2);
-      Collections.sort(children);
       // wait for the backup manager to learn to be the backup
       UtilWaitThread.sleep(1000);
       // generate a false zookeeper event
-      String lockPath = root + Constants.ZMANAGER_LOCK + children.get(0);
+      String lockPath = root + Constants.ZMANAGER_LOCK + "/" + children.get(0);

Review comment:
       Thanks for catching this. I had run this test and fixed the same bug, which I introduced when I replaced the text with the constant, but in managing multiple pull requests I must have lost the change.




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

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



[GitHub] [accumulo] ctubbsii commented on a change in pull request #1926: Fix incorrect sorting of ZooLock child nodes

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1926:
URL: https://github.com/apache/accumulo/pull/1926#discussion_r574307982



##########
File path: core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
##########
@@ -63,7 +63,6 @@ public AdminUtil() {
    *          <code>System.exit(1)</code> on error if true
    */
   public AdminUtil(boolean exitOnError) {
-    super();

Review comment:
       This was removed by my editor as redundant when I saved the file.

##########
File path: core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
##########
@@ -293,12 +292,10 @@ private void findLocks(ZooReader zk, final String lockPath,
 
             if (pos == 0) {
               locks = heldLocks;
+            } else if (lda[0].charAt(0) == 'R' && !sawWriteLock) {
+              locks = heldLocks;
             } else {
-              if (lda[0].charAt(0) == 'R' && !sawWriteLock) {
-                locks = heldLocks;
-              } else {
-                locks = waitingLocks;
-              }
+              locks = waitingLocks;

Review comment:
       This was converted by my editor as redundant when I saved the file, and is clearly better, so I kept 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.

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



[GitHub] [accumulo] ctubbsii merged pull request #1926: Fix incorrect sorting of ZooLock child nodes

Posted by GitBox <gi...@apache.org>.
ctubbsii merged pull request #1926:
URL: https://github.com/apache/accumulo/pull/1926


   


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

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