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

Should we add a postOpenDeployTasks after open splited or merged region?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.98.6, 1.4.0, 1.2.6, 1.1.11
    • None
    • Region Assignment
    • None

    Description

      I have a question that why we skip postOpenDeployTasks() when we not using zk for assignment?

            if (services != null) {
              try {
                if (useZKForAssignment) {
                  // add 2nd daughter first (see HBASE-4335)
                  services.postOpenDeployTasks(b);
                } else if (!services.reportRegionStateTransition(TransitionCode.SPLIT,
                    parent.getRegionInfo(), hri_a, hri_b)) {
                  throw new IOException("Failed to report split region to master: "
                    + parent.getRegionInfo().getShortNameToLog());
                }
                // Should add it to OnlineRegions
                services.addToOnlineRegions(b);
                if (useZKForAssignment) {
                  services.postOpenDeployTasks(a);
                }
                services.addToOnlineRegions(a);
              } catch (KeeperException ke) {
                throw new IOException(ke);
              }
            }
      

      It causes a new splitted region or new merged region will not compact their reference files. Then if the normalizer thread want to split this region, it will get stuck.

      public boolean canSplit() {
          this.lock.readLock().lock();
          try {
            // Not split-able if we find a reference store file present in the store.
            boolean result = !hasReferences();
            if (!result && LOG.isDebugEnabled()) {
              LOG.debug("Cannot split region due to reference files being there");
            }
            return result;
          } finally {
            this.lock.readLock().unlock();
          }
        }
      

      According to the code, should we add a services.postOpenDeployTasks after successfully reportRegionStateTransition(TransitionCode.SPLIT, parent.getRegionInfo(), hri_a, hri_b) ?

      Attachments

        1. HBASE-18619.patch
          3 kB
          Jingyun Tian

        Issue Links

          Activity

            People

              tianjingyun Jingyun Tian
              tianjingyun Jingyun Tian
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: