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

hard coded wait time out value in HBaseTestingUtility#waitUntilAllRegionsAssigned might cause test failure

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      HBaseTestingUtility#waitUntilAllRegionsAssigned(final TableName tableName) hard coded 60 seconds wait for region assignment in a table. This could cause flaky tests, as the caller could create table with longs of region which takes longs time; or in CM, RS unavailable could slow down assignment; or in a slow machine, IT might take long to assign regions.

      In HBaseAdmin.java, we use a configurable value to wait for the table DDLs: this.syncWaitTimeout = this.conf.getInt("hbase.client.sync.wait.timeout.msec", 10 * 60000); // 10min - we should use the config for the HBaseTestingUtility#waitUntilAllRegionsAssigned() too.

      Of course, the caller could use the "public void waitUntilAllRegionsAssigned(final TableName tableName, final long timeout)"; but it requires test change (currently, no test directly calls this signature).

        
      /**
         * Wait until all regions for a table in hbase:meta have a non-empty
         * info:server, up to 60 seconds. This means all regions have been deployed,
         * master has been informed and updated hbase:meta with the regions deployed
         * server.
         * @param tableName the table name
         * @throws IOException
         */
        public void waitUntilAllRegionsAssigned(final TableName tableName) throws IOException {
          waitUntilAllRegionsAssigned(tableName, 60000);
        }
      

      Attachments

        1. HBASE-15636.v1-master.patch
          1 kB
          Stephen Yuan Jiang

        Activity

          People

            syuanjiang Stephen Yuan Jiang
            syuanjiang Stephen Yuan Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: