HBase
  1. HBase
  2. HBASE-8169

TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.98.0, 0.94.7
    • Fix Version/s: 0.98.0, 0.94.7, 0.95.1
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In the test case, we use "master.assignRegion(hri);" to assign regions to live RS or dead RS(will be aborted during the test). While master.assignRegion may not always successfully assign a region to the expected RS due to following error:

      1) We firstly try to open a region in region server, let's say RS1
      2) For some reason the region open takes more than a time out period
      3) AM tries to reassign it and force a new plan due to the time out
      4) the Region is re-assigned to a random RS

      Then it cause the test case failure due to regions setup isn't in expected state.

      I attached a log with extra added logging info and some stack traces(with (new Exception()).printStackTrace() so you can ignore java.lang.Exception). You can search region 36716be644bc9c78b3a96e0d4a43c183 to see master.assignRegion assigned a region to a randome RS. I saw the test failed once in 5 times in a loop.

      1. hbase-8169_trunk.patch
        7 kB
        Jeffrey Zhong
      2. hbase-8169_0.94_rebased.patch
        8 kB
        Jeffrey Zhong
      3. hbase-8169.patch
        8 kB
        Jeffrey Zhong
      4. RegionAssignedRandomly.txt
        719 kB
        Jeffrey Zhong

        Activity

        Hide
        Hudson added a comment -

        Integrated in hbase-0.95 #126 (See https://builds.apache.org/job/hbase-0.95/126/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464791)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in hbase-0.95 #126 (See https://builds.apache.org/job/hbase-0.95/126/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464791) Result = FAILURE larsh : Files : /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #4016 (See https://builds.apache.org/job/HBase-TRUNK/4016/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464790)

        Result = SUCCESS
        larsh :
        Files :

        • /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #4016 (See https://builds.apache.org/job/HBase-TRUNK/4016/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464790) Result = SUCCESS larsh : Files : /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94-security #132 (See https://builds.apache.org/job/HBase-0.94-security/132/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464787)

        Result = SUCCESS
        larsh :
        Files :

        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in HBase-0.94-security #132 (See https://builds.apache.org/job/HBase-0.94-security/132/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464787) Result = SUCCESS larsh : Files : /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94-security-on-Hadoop-23 #13 (See https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/13/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464787)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in HBase-0.94-security-on-Hadoop-23 #13 (See https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/13/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464787) Result = FAILURE larsh : Files : /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94 #944 (See https://builds.apache.org/job/HBase-0.94/944/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464787)

        Result = SUCCESS
        larsh :
        Files :

        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in HBase-0.94 #944 (See https://builds.apache.org/job/HBase-0.94/944/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464787) Result = SUCCESS larsh : Files : /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #477 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/477/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464790)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #477 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/477/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464790) Result = FAILURE larsh : Files : /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Hudson added a comment -

        Integrated in hbase-0.95-on-hadoop2 #55 (See https://builds.apache.org/job/hbase-0.95-on-hadoop2/55/)
        HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464791)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
        • /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Show
        Hudson added a comment - Integrated in hbase-0.95-on-hadoop2 #55 (See https://builds.apache.org/job/hbase-0.95-on-hadoop2/55/ ) HBASE-8169 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS may fail due to regions randomly assigned to a RS (Jeffrey Zhong) (Revision 1464791) Result = FAILURE larsh : Files : /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
        Hide
        Lars Hofhansl added a comment -

        Committed to 0.94, 0.95, and 0.98.
        Thanks for the patch Jeffrey.

        Show
        Lars Hofhansl added a comment - Committed to 0.94, 0.95, and 0.98. Thanks for the patch Jeffrey.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12577077/hbase-8169_trunk.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 6 new or modified tests.

        +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 lineLengths. The patch does not introduce lines longer than 100

        +1 site. The mvn site goal succeeds with this patch.

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12577077/hbase-8169_trunk.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 6 new or modified tests. +1 hadoop2.0 . The patch compiles against the hadoop 2.0 profile. +1 javadoc . The javadoc tool did not generate any warning messages. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 +1 site . The mvn site goal succeeds with this patch. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/5143//console This message is automatically generated.
        Hide
        Jeffrey Zhong added a comment -

        Uploaded two rebased patches: one for 0.94.x and one for trunk.

        Cheers!

        Show
        Jeffrey Zhong added a comment - Uploaded two rebased patches: one for 0.94.x and one for trunk. Cheers!
        Hide
        Jeffrey Zhong added a comment -

        Stack Sure, I'll provide a patch for trunk/0.95 soon.

        Show
        Jeffrey Zhong added a comment - Stack Sure, I'll provide a patch for trunk/0.95 soon.
        Hide
        stack added a comment -

        Jeffrey Zhong Yeah, for sure interested if you fix for trunk/0.95 too.

        Show
        stack added a comment - Jeffrey Zhong Yeah, for sure interested if you fix for trunk/0.95 too.
        Hide
        Lars Hofhansl added a comment -

        +1 will commit unless there are objections.
        Jeffrey Zhong The attached patch is for 0.94. I assume this is an issue in 0.95 and trunk as well?

        Show
        Lars Hofhansl added a comment - +1 will commit unless there are objections. Jeffrey Zhong The attached patch is for 0.94. I assume this is an issue in 0.95 and trunk as well?
        Hide
        Jeffrey Zhong added a comment -

        I think a region can be assigned randomly by design in a time out situation so I came up a patch for the issue in case someone else also stumble on this.

        Show
        Jeffrey Zhong added a comment - I think a region can be assigned randomly by design in a time out situation so I came up a patch for the issue in case someone else also stumble on this.

          People

          • Assignee:
            Jeffrey Zhong
            Reporter:
            Jeffrey Zhong
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development