From 6e80c35a98eb77c310b1a84b5c0d604f298331d5 Mon Sep 17 00:00:00 2001 From: Jean-Daniel Cryans Date: Thu, 11 Nov 2010 06:16:34 +0000 Subject: [PATCH] HBASE-3221 Race between splitting and disabling git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1033821 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../apache/hadoop/hbase/master/AssignmentManager.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a32e330988e..b01697b5b35 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -676,6 +676,7 @@ Release 0.90.0 - Unreleased HBASE-3216 Move HBaseFsck from client to util HBASE-3219 Split parents are reassigned on restart and on disable/enable HBASE-3222 Regionserver region listing in UI is no longer ordered + HBASE-3221 Race between splitting and disabling IMPROVEMENTS diff --git a/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index e14aab87342..83223db0c3b 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -1620,6 +1620,16 @@ public class AssignmentManager extends ZooKeeperListener { regionOffline(parent); regionOnline(a, hsi); regionOnline(b, hsi); + + // There's a possibility that the region was splitting while a user asked + // the master to disable, we need to make sure we close those regions in + // that case. This is not racing with the region server itself since RS + // report is done after the split transaction completed. + if (this.zkTable.isDisablingOrDisabledTable( + parent.getTableDesc().getNameAsString())) { + unassign(a); + unassign(b); + } } /**