apurtell commented on a change in pull request #809: HBASE-23261 : Processing 
ZK BadVersionException during node transition
URL: https://github.com/apache/hbase/pull/809#discussion_r344827892
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
 ##########
 @@ -868,7 +868,15 @@ public static int transitionNode(ZooKeeperWatcher zkw, 
HRegionInfo region,
     try {
       rt = RegionTransition.createRegionTransition(
           endState, region.getRegionName(), serverName, payload);
-      if(!ZKUtil.setData(zkw, node, rt.toByteArray(), stat.getVersion())) {
+      boolean isDataSet;
+      try {
+        isDataSet = ZKUtil.setData(zkw, node, rt.toByteArray(), 
stat.getVersion());
 
 Review comment:
   We tell ZK to set the data only if the znode version has not changed, to 
protect us from race conditions and unexpected change by another party. The 
fact we fail here with badVersion means this protection has been tripped. 
   
   The question then is should the updated data be re-read? Someone changed it. 
To what? Where do we read the updated information (in this patch)?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to