Apache9 commented on a change in pull request #3876:
URL: https://github.com/apache/hbase/pull/3876#discussion_r755633516



##########
File path: 
hbase-replication/src/test/java/org/apache/hadoop/hbase/replication/TestZKReplicationQueueStorage.java
##########
@@ -206,18 +206,22 @@ public void testAddRemoveLog() throws 
ReplicationException {
     }
   }
 
-  // For HBASE-12865
+  // For HBASE-12865, HBASE-26482

Review comment:
       Better introduce another test? I think this test is to confirm that when 
there is only a single queue than we will delete the server znode so the 
cversion of the queuesZNode will be changed.
   
   We should add another test where even we do not delete the server znode, the 
cversion of the queuesZNode will still be changed.

##########
File path: 
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java
##########
@@ -417,6 +417,11 @@ public long getWALPosition(ServerName serverName, String 
queueId, String fileNam
       }
       // add delete op for peer
       listOfOps.add(ZKUtilOp.deleteNodeFailSilent(oldQueueNode));
+      // Append new queue id for prevent lock competition in zookeeper server.
+      String claimLockZNode = ZNodePaths.joinZNode(queuesZNode, "cversion_" + 
newQueueId);
+      // update cversion for queuesZNode
+      listOfOps.add(ZKUtilOp.createAndFailSilent(claimLockZNode, 
HConstants.EMPTY_BYTE_ARRAY));

Review comment:
       So this is the trick. Better speak more clearly that this is for 
changing the cversion of the root queueZNode, and add a link to the getAllWALs 
method.




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