virajjasani 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_r344433718
##########
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());
+ } catch (KeeperException.BadVersionException e) {
Review comment:
Thanks @bharathv
Agree to all points, however the reason why this Exception is not handled in
setData() is because we don't want to touch other workflows, i.e. if some
workflow already has some logic when they catch this Exception(many workflows
do catch it), they would never get to do it anymore.
I understand that handling BVE in setData() would be better fix but there
are so many workflows currently using it that we should not risk impacting them
while fixing our specific case of node transitioning, but yes this can be done
in another Jira given that the impact is huge and involves multiple workflows.
----------------------------------------------------------------
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