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

Meta replica does not give any primaryOperationTimeout to primary meta region

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.0, 2.0.0
    • None
    • None
    • Reviewed
    • Hide
      When a client is configured to use meta replica, it sends scan request to all meta replicas almost at the same time. Since meta replica contains stale data, if result from one of replica comes back first, the client may get wrong region locations. To fix this, "hbase.client.meta.replica.scan.timeout" is introduced, a client will always send to primary meta region first, wait the configured timeout for reply. If no result is received, it will send request to replica meta regions. The unit for "hbase.client.meta.replica.scan.timeout" is microsecond, the default value is 1000000 (1 second).
      Show
      When a client is configured to use meta replica, it sends scan request to all meta replicas almost at the same time. Since meta replica contains stale data, if result from one of replica comes back first, the client may get wrong region locations. To fix this, "hbase.client.meta.replica.scan.timeout" is introduced, a client will always send to primary meta region first, wait the configured timeout for reply. If no result is received, it will send request to replica meta regions. The unit for "hbase.client.meta.replica.scan.timeout" is microsecond, the default value is 1000000 (1 second).

    Description

      I was working on my unittest and it failed with TableNotFoundException. I debugged a bit and found out that for meta scan, it does not give any primaryOperationTimeout to primary meta region. This will be an issue as the meta replica will contain stale data and it is possible that the meta replica will return back first than primary.

      https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java#L823

      Attachments

        1. 18035.branch-1.v001.patch
          11 kB
          Ted Yu
        2. 18035-branch-1-v001.patch
          11 kB
          Ted Yu
        3. HBASE-18035-branch-1-v001.patch
          11 kB
          Hua Xiang
        4. HBASE-18035-master-v002.patch
          11 kB
          Hua Xiang
        5. HBASE-18035-master-v001.patch
          13 kB
          Hua Xiang
        6. HBASE-18035-master-v001.patch
          13 kB
          Hua Xiang
        7. 18035-unittest.patch
          7 kB
          Hua Xiang

        Issue Links

          Activity

            People

              huaxiang Hua Xiang
              huaxiang Hua Xiang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: