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

for idempotent operation dups, return the result instead of throwing conflict exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0, 2.0.0
    • None
    • None
    • Reviewed
    • Hide
      Non-idempotent operations (increment/append/checkAndPut/...) may throw OperationConflictException even though the increment/append succeeded. For example (client rpc retries number set to 3):

      1. first increment rpc request success
      2. client timeout and send second rpc request, but nonce is same and save in server. The server found that it has already succeed, so return a OperationConflictException to make sure that increment operation only be applied once in server.

      This patch will solve this problem by read the previous result when receive a duplicate rpc request.
      1. Store the mvcc to OperationContext. When first rpc request succeed, store the mvcc for this operation nonce.
      2. When there are duplicate rpc request, convert to read result by the mvcc.
      Show
      Non-idempotent operations (increment/append/checkAndPut/...) may throw OperationConflictException even though the increment/append succeeded. For example (client rpc retries number set to 3): 1. first increment rpc request success 2. client timeout and send second rpc request, but nonce is same and save in server. The server found that it has already succeed, so return a OperationConflictException to make sure that increment operation only be applied once in server. This patch will solve this problem by read the previous result when receive a duplicate rpc request. 1. Store the mvcc to OperationContext. When first rpc request succeed, store the mvcc for this operation nonce. 2. When there are duplicate rpc request, convert to read result by the mvcc.

    Description

      After HBASE-3787, we could store mvcc in operation context, and use it to convert the modification request into read on dups instead of throwing OperationConflictException.
      MVCC tracking will have to be aware of such MVCC numbers present. Given that scanners are usually relatively short-lived, that would prevent low watermark from advancing for quite a bit more time

      Attachments

        1. HBASE-9899-addendum-branch-1.patch
          1 kB
          Guanghao Zhang
        2. HBASE-9899-branch-1.patch
          30 kB
          Michael Stack
        3. HBASE-9899-branch-1.patch
          30 kB
          Guanghao Zhang
        4. HBASE-9899-addendum.patch
          2 kB
          Guanghao Zhang
        5. HBASE-9899-branch-1.patch
          30 kB
          Guanghao Zhang
        6. HBASE-9899-v4.patch
          30 kB
          Guanghao Zhang
        7. HBASE-9899-v4.patch
          30 kB
          Guanghao Zhang
        8. HBASE-9899-v3.patch
          26 kB
          Guanghao Zhang
        9. HBASE-9899-v3.patch
          26 kB
          Guanghao Zhang
        10. HBASE-9899-v2.patch
          22 kB
          Guanghao Zhang
        11. HBASE-9899-v1.patch
          20 kB
          Guanghao Zhang

        Issue Links

          Activity

            People

              zghao Guanghao Zhang
              sershe Sergey Shelukhin
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: