From 8ce7f905d25087e2dde5d9d8cbceaf477b1e1db3 Mon Sep 17 00:00:00 2001 From: tedyu Date: Thu, 16 Apr 2015 11:08:54 -0700 Subject: [PATCH] HBASE-13463 Quota needs to be updated only in case of successful region merge --- .../hadoop/hbase/master/AssignmentManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 2b7b9178ba2..bf9b207daba 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -4236,15 +4236,17 @@ public class AssignmentManager extends ZooKeeperListener { case READY_TO_MERGE: case MERGE_PONR: case MERGED: - try { - regionStateListener.onRegionMerged(hri); - } catch (IOException exp) { - errorMsg = StringUtils.stringifyException(exp); - } case MERGE_REVERTED: errorMsg = onRegionMerge(serverName, code, hri, HRegionInfo.convert(transition.getRegionInfo(1)), HRegionInfo.convert(transition.getRegionInfo(2))); + if (code == TransitionCode.MERGED && org.apache.commons.lang.StringUtils.isEmpty(errorMsg)) { + try { + regionStateListener.onRegionMerged(hri); + } catch (IOException exp) { + errorMsg = StringUtils.stringifyException(exp); + } + } break; default: