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_r344836708
##########
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(),
+ b.getRegionInfo(),
coordinationManager.getServer().getServerName(), zstd,
+ RS_ZK_REGION_SPLITTING, RS_ZK_REGION_SPLIT);
+ if (newNodeVersion != -1) {
+ break;
+ }
+ Thread.sleep(100);
+ }
+ if (newNodeVersion == -1) {
Review comment:
Throwing an exception here before blindly calling setZnodeVersion is
definitely an improvement.
----------------------------------------------------------------
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