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

AssignmentManager.assign() is not sync in both path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0, 1.2.0, 2.0.0
    • 1.2.0, 1.1.1, 2.0.0
    • Region Assignment
    • None

    Description

      from the comment and the expected behavior AssignmentManager.assign() should be sync

      /** Assigns specified regions round robin, if any.
       * This is a synchronous call and will return once every region has been
      public void assign(List<HRegionInfo> regions)
      

      but the code has two path. 1 sync and the async

      if (servers == 1 || (regions < bulkAssignThresholdRegions
              && servers < bulkAssignThresholdServers)) {
         for (HRegionInfo region: plan.getValue()) {
           ...
              invokeAssign(region);  // <-- this is async threadPool.submit(assign)
           ...
        }
      } else {
        BulkAssigner ba = new GeneralBulkAssigner(...);
        ba.bulkAssign();  // <-- this is sync, calls BulkAssign.waitUntilDone()
      }
      

      https://builds.apache.org/job/HBase-1.1/452/ TestCreateTableProcedure is flaky because of this async behavior

      Attachments

        1. HBASE-13606-v0.patch
          1 kB
          Matteo Bertozzi
        2. HBASE-13606-v1.patch
          2 kB
          Matteo Bertozzi
        3. HBASE-13606-v1-branch-1.patch
          2 kB
          Matteo Bertozzi
        4. TEST-org.apache.hadoop.hbase.master.procedure.TestCreateTableProcedure.xml
          812 kB
          Nick Dimiduk
        5. HBASE-13606-v2-branch-1.patch
          8 kB
          Matteo Bertozzi
        6. HBASE-13606-v2.patch
          8 kB
          Matteo Bertozzi
        7. HBASE-13606-v3.patch
          9 kB
          Matteo Bertozzi

        Activity

          People

            mbertozzi Matteo Bertozzi
            mbertozzi Matteo Bertozzi
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: