You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2012/11/21 01:01:25 UTC

svn commit: r1411938 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java

Author: liyin
Date: Wed Nov 21 00:01:24 2012
New Revision: 1411938

URL: http://svn.apache.org/viewvc?rev=1411938&view=rev
Log:
[HBASE-7194] [0.89-fb] Fix transient assignments

Author: aaiyer

Summary:
Currently, we add a transient assignment, but do not remove it in the favoured
assignment path. So, if a region gets assigned to a server, which is not the
primary, then
  until the transient assignment times out in 1 minute:
    - load balancer tries to close the region and assign it to Primary.
    - The transient assignment plan is rejected because of the preexisting
    assignment (which was not cleaned up).
    - the region may get reassigned to the non-primary server again.

    We should clean up regionsWithTransientAssignment as soon as we have
asked the server to open the region.

Test Plan:
run MR tests. do a cluster start/stop and make sure that
we do not run into the same condition

Reviewers: liyintang

Reviewed By: liyintang

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D626815

Task ID: 1875475

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java?rev=1411938&r1=1411937&r2=1411938&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java Wed Nov 21 00:01:24 2012
@@ -534,6 +534,8 @@ public class RegionManager {
     } else {
       returnMsgs.add(new HMsg(HMsg.Type.MSG_REGION_OPEN, rs.getRegionInfo()));
     }
+    // Now that we have told the server to open the region. Clean up the assignment plan.
+    assignmentManager.removeTransientAssignment(sinfo.getServerAddress(), rs.regionInfo);
   }
 
   /*