Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-13145

TestNamespaceAuditor.testRegionMerge is flaky

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 2.0.0
    • Fix Version/s: 1.1.0, 2.0.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Dig into the log
      https://builds.apache.org/job/HBase-TRUNK/6197/artifact/hbase-server/target/surefire-reports/org.apache.hadoop.hbase.namespace.TestNamespaceAuditor-output.txt
      Seems a split operation which we expect to success is started before we finishing a merge and cause an infinite sleep loop.

      I guess the problem is here

      TestNamespaceAuditor.java
          // merge the two regions
          admin.mergeRegions(hris.get(0).getEncodedNameAsBytes(),
            hris.get(1).getEncodedNameAsBytes(), false);
          
          while (admin.getTableRegions(tableTwo).size() == initialRegions) {
            Thread.sleep(100);
          }
      

      I guess that during a merge, we can get more region count than before because we first online the new region and then offline the two old regions.
      So change it to admin.getTableRegions(tableTwo).size() != initialRegions - 1 may work.

      And we can modify the while loop to use Waiter.waitFor which can provide more useful information when test failed.

        Attachments

        1. HBASE-13145.patch
          25 kB
          Michael Stack
        2. HBASE-13145.patch
          25 kB
          Duo Zhang

          Issue Links

            Activity

              People

              • Assignee:
                zhangduo Duo Zhang
                Reporter:
                zhangduo Duo Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: