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

Punt on the timeout doesn't work in BulkEnabler#waitUntilDone (master's EnableTableHandler)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.90.5, 0.92.0
    • 0.94.0
    • master
    • None
    • Reviewed

    Description

      please take a look at the code below in EnableTableHandler(hbase master):

      EnableTableHandler.java
          protected boolean waitUntilDone(long timeout)
          throws InterruptedException {
          
            .....
            int lastNumberOfRegions = this.countOfRegionsInTable;
      
            while (!server.isStopped() && remaining > 0) {
              Thread.sleep(waitingTimeForEvents);
              regions = assignmentManager.getRegionsOfTable(tableName);
              if (isDone(regions)) break;
      
              // Punt on the timeout as long we make progress
              if (regions.size() > lastNumberOfRegions) {
                lastNumberOfRegions = regions.size();
                timeout += waitingTimeForEvents;
              }
              remaining = timeout - (System.currentTimeMillis() - startTime);
          ....
          }
          private boolean isDone(final List<HRegionInfo> regions) {
            return regions != null && regions.size() >= this.countOfRegionsInTable;
          }
      
      

      We can easily find out if we let lastNumberOfRegions = this.countOfRegionsInTable , the function of punt on timeout code will never be executed. I think initlize lastNumberOfRegions = 0 can make it work.

      Attachments

        1. HBASE-5425.patch
          0.7 kB
          terry zhang

        Activity

          People

            terry_zhang terry zhang
            terry_zhang terry zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: