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

Add lock back to avoid parallel accessing meta to locate region

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.1, 1.2.6, 2.0.0-alpha-3, 1.1.12
    • 1.4.0, 1.3.2, 2.0.0-beta-1, 2.0.0, 1.2.7
    • None
    • None
    • Reviewed

    Description

      In branch-0.98 we have below codes to avoid accessing meta in parallel in HConnectionManager:

                Result regionInfoRow;
                // This block guards against two threads trying to load the meta
                // region at the same time. The first will load the meta region and
                // the second will use the value that the first one found.
                if (useCache) {
                  if (TableName.META_TABLE_NAME.equals(parentTable) && usePrefetch &&
                      getRegionCachePrefetch(tableName)) {
                    synchronized (regionLockObject) {
                      // Check the cache again for a hit in case some other thread made the
                      // same query while we were waiting on the lock.
                      ...
                    }
                  }
                ...
      

      while in HBASE-10018 we removed such logic along with region-location-prefetching.

      We regard this as an unexpected behavior change and observed below phenomenon in our product env:
      1. Unnecessary connection setup to meta when multiple threads locating region in a client process
      2. Priority handler of the RS holding meta region exhausted, application keep retrying and cause a vicious circle

      To resolve this problem, we propose to add the userRegionLock back and keep the behavior in accordance with 0.98

      Attachments

        1. HBASE-19260.patch
          2 kB
          Yu Li
        2. HBASE-19260.v2.patch
          5 kB
          Yu Li

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            liyu Yu Li
            liyu Yu Li
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment