You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/11/11 06:54:44 UTC

[GitHub] [hbase] mnpoonia commented on a change in pull request #809: HBASE-23261 : Processing ZK BadVersionException during node transition

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

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
 ##########
 @@ -868,7 +868,20 @@ 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());
+      } catch (KeeperException.BadVersionException e) {
+        // handling specific failure - see HBASE-23261
+        // for other state changes, callers have some logic to handle Exception
+        if (!EventType.RS_ZK_REQUEST_REGION_SPLIT.equals(endState)) {
 
 Review comment:
   Is it okay to have a special case here. I think we can retry and that will trigger the watchers of master. Am i missing something here.?

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


With regards,
Apache Git Services