hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-3787) Increment is non-idempotent but client retries RPC
Date Fri, 12 Apr 2013 05:37:17 GMT

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

stack commented on HBASE-3787:
------------------------------

Patch looking good.

Add a comment that says what the result looks like when:

generateClientId

happens.

Why not just a UUID rather than all these gyrations?  Or do you want to make it so that looking
at id, you can tell what client it came from?  It looks like you throw away all this info
when you create the SecureRandom?  Creating a SecureRandom for this one time use is expensive.

Client id should be long since in proto is uint64 in proto?

Does ClientNonceManager have to be in top-level?  Can it not be in client package and be made
package private?

Does it make sense putting clientid together w/ nonce making?  Could you have a class that
does noncemaking and then another to hold the clientid?  Is clientid tied to Connection? 
Can you get connectionid?  Or make a connectionid?  Connections are keyed by Configuration
already?  Would the Connection key do as a clientid?

Would it be easier or make it so you could shut down access on ClientNonceManager by passing
in the id only rather than the whole nonce when you do this:

               MutateRequest request = RequestConverter.buildMutateRequest(
-                location.getRegionInfo().getRegionName(), append);
+                location.getRegionInfo().getRegionName(), append, clientId, nonce);


So, you decided to not pass nonce in here:

+        r = region.append(append, append.getWriteToWAL()/*, clientId2, nonce*/);

I like the way this works over on the server side.

You dup code in append and increment.

Good stuff Sergey.
                
> 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

Mime
View raw message