[ 
https://issues.apache.org/jira/browse/HBASE-9899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400331#comment-15400331
 ] 

Guanghao Zhang commented on HBASE-9899:
---------------------------------------

There are some situation to use these non-idempotent operations 
(increment/append/checkAndPut/...). When use 0.94, we set not retry for these 
non-idempotent operations. Now we upgrade our cluster to 0.98 and found that it 
use nonce to solve this. But it maybe throw OperationConflictException even the 
increment/append success. A example (client rpc retries number set to 3) is:
1. first increment rpc request success
2. client timeout and send second rpc request success, but nonce is same and 
save in server. It found it 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.

> for idempotent operation dups, return the result instead of throwing conflict 
> exception
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-9899
>                 URL: https://issues.apache.org/jira/browse/HBASE-9899
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Sergey Shelukhin
>            Assignee: Enis Soztutar
>         Attachments: HBASE-9899-v1.patch
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to