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

Sergey Shelukhin commented on HBASE-3787:
-----------------------------------------

That is an interesting question. Ideally we want to be able to respond for sure 
if operation completed successfully or not, to make the client sure he can (or 
cannot) retry; but this is not achievable unless we store all nonce-s and also 
recover them between restarts.
So there will be some ambiguity.
It also depends, as mentioned above, on whether client needs the answer to 
increment or append that is exactly after the op or at any time after the op.
So there can be multiple outcomes when client sends retry:
0. Nonce is marked as last attempt failed, or doesn't exist on server - normal 
retry.
1. Nonce has been recycled due to age, or operation succeeded:
  a) Client needs "consistent" answer - exception that operation succeeded but 
no answer can be provided, no retry.
  b) Client doesn't need "consistent" answer - request does a "get" and client 
receives the answer.
2. Nonce has not been seen during latest recovery but is before latest nonce 
seen - unknown result, retry at client's discretion.
By making WAL recovery include more records, or some separate processing for 
nonces inside WAL records already in store, we can alleviate that.
3. Nonce is marked as operation in progress. Wait on some sort of waiting 
construct attached, then 0 or 1.



                
> Increment is non-idempotent but client retries RPC
> --------------------------------------------------
>
>                 Key: HBASE-3787
>                 URL: https://issues.apache.org/jira/browse/HBASE-3787
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.94.4, 0.95.2
>            Reporter: dhruba borthakur
>            Assignee: Sergey Shelukhin
>            Priority: Critical
>             Fix For: 0.95.1
>
>         Attachments: HBASE-3787-partial.patch
>
>
> The HTable.increment() operation is non-idempotent. The client retries the 
> increment RPC a few times (as specified by configuration) before throwing an 
> error to the application. This makes it possible that the same increment call 
> be applied twice at the server.
> For increment operations, is it better to use 
> HConnectionManager.getRegionServerWithoutRetries()? Another  option would be 
> to enhance the IPC module to make the RPC server correctly identify if the 
> RPC is a retry attempt and handle accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to