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_r344852268
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitTransactionCoordination.java
##########
@@ -222,9 +229,21 @@ public void completeSplitTransaction(final
RegionServerServices services, Region
// Tell master about split by updating zk. If we fail, abort.
if (coordinationManager.getServer() != null) {
try {
- zstd.setZnodeVersion(transitionSplittingNode(parent.getRegionInfo(),
a.getRegionInfo(),
- b.getRegionInfo(), coordinationManager.getServer().getServerName(),
zstd,
- RS_ZK_REGION_SPLITTING, RS_ZK_REGION_SPLIT));
+ int newNodeVersion = -1;
+ for (int i = 0; i < SPLIT_WAIT_TIMEOUT; i++) {
+ newNodeVersion = transitionSplittingNode(parent.getRegionInfo(),
a.getRegionInfo(),
Review comment:
To clarify reg this retry logic, I am just trying to add retry logic similar
to above method `waitForSplitTransaction()` just to be consistent if we get BVE
here while transitioning ZNode from RS_ZK_REGION_SPLITTING to
RS_ZK_REGION_SPLIT, which we have not observed so far. The issue that we have
observed has been with `waitForSplitTransaction()` but if there is a
possibility of BVE here, we want to implement similar retry logic because if we
fail to update ZNode state to RS_ZK_REGION_SPLIT here, we are going to get RIT
for sure.
However, yes sync() ZK API calls sounds more reasonable
----------------------------------------------------------------
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