HBase
  1. HBase
  2. HBASE-5877

When a query fails because the region has moved, let the regionserver return the new address to the client

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.95.2
    • Fix Version/s: 0.95.0
    • Component/s: Client, master, regionserver
    • Labels:
      None

      Description

      This is mainly useful when we do a rolling restart. This will decrease the load on the master and the network load.

      Note that a region is not immediately opened after a close. So:

      • it seems preferable to wait before retrying on the other server. An optimisation would be to have an heuristic depending on when the region was closed.
      • during a rolling restart, the server moves the regions then stops. So we may have failures when the server is stopped, and this patch won't help.

      The implementation in the first patch does:

      • on the region move, there is an added parameter on the regionserver#close to say where we are sending the region
      • the regionserver keeps a list of what was moved. Each entry is kept 100 seconds.
      • the regionserver sends a specific exception when it receives a query on a moved region. This exception contains the new address.
      • the client analyses the exeptions and update its cache accordingly...
      1. 5877-v17.txt
        62 kB
        Ted Yu
      2. 5877-v17.txt
        62 kB
        stack
      3. 5877-v16.txt
        62 kB
        Ted Yu
      4. 5877.v6.patch
        56 kB
        Nicolas Liochon
      5. 5877.v18.patch
        65 kB
        Nicolas Liochon
      6. 5877.v18.patch
        65 kB
        Nicolas Liochon
      7. 5877.v18.patch
        65 kB
        Nicolas Liochon
      8. 5877.v15.patch
        65 kB
        Nicolas Liochon
      9. 5877.v12.patch
        61 kB
        Nicolas Liochon
      10. 5877.v1.patch
        35 kB
        Nicolas Liochon

        Issue Links

          Activity

          Nicolas Liochon created issue -
          Nicolas Liochon made changes -
          Field Original Value New Value
          Link This issue is required by HBASE-5843 [ HBASE-5843 ]
          Nicolas Liochon made changes -
          Attachment 5877.v1.patch [ 12524327 ]
          Ted Yu made changes -
          Summary When a query fails because the region has moved, let the regionserver returns the new address to the client When a query fails because the region has moved, let the regionserver return the new address to the client
          Fix Version/s 0.96.0 [ 12320040 ]
          Ted Yu made changes -
          Comment [ @N:
          I think the following validation in real cluster would illustrate the benefit of this feature:
          For given table, select a region server and note the row key ranges hosted by the region server. Direct client load to this server.
          Kill the server at time T.

          Difference in client response to region migration around time T with and without the patch would be interesting. ]
          Nicolas Liochon made changes -
          Attachment 5877.v6.patch [ 12525304 ]
          Nicolas Liochon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Nicolas Liochon made changes -
          Link This issue relates to HBASE-5924 [ HBASE-5924 ]
          Nicolas Liochon made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Nicolas Liochon made changes -
          Attachment 5877.v12.patch [ 12525508 ]
          Nicolas Liochon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Nicolas Liochon made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Nicolas Liochon made changes -
          Attachment 5877.v15.patch [ 12525660 ]
          Nicolas Liochon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ted Yu made changes -
          Attachment 5877-v16.txt [ 12525676 ]
          Ted Yu made changes -
          Attachment 5877-v17.txt [ 12525684 ]
          stack made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          stack made changes -
          Attachment 5877-v17.txt [ 12525963 ]
          stack made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Nicolas Liochon made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Nicolas Liochon made changes -
          Attachment 5877.v18.patch [ 12526047 ]
          Nicolas Liochon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Nicolas Liochon made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Nicolas Liochon made changes -
          Attachment 5877.v18.patch [ 12526123 ]
          Nicolas Liochon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Nicolas Liochon made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Nicolas Liochon made changes -
          Attachment 5877.v18.patch [ 12526501 ]
          Nicolas Liochon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Nicolas Liochon made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Nicolas Liochon made changes -
          Link This issue is related to HBASE-5992 [ HBASE-5992 ]
          stack made changes -
          Fix Version/s 0.95.0 [ 12324094 ]
          Fix Version/s 0.96.0 [ 12320040 ]
          stack made changes -
          Fix Version/s 0.98.0 [ 12323143 ]
          stack made changes -
          Fix Version/s 0.98.0 [ 12323143 ]
          stack made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Nicolas Liochon
              Reporter:
              Nicolas Liochon
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development