Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B4A6C1033A for ; Wed, 13 Nov 2013 23:23:24 +0000 (UTC) Received: (qmail 59855 invoked by uid 500); 13 Nov 2013 23:23:24 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 59821 invoked by uid 500); 13 Nov 2013 23:23:24 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 59752 invoked by uid 99); 13 Nov 2013 23:23:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 23:23:24 +0000 Date: Wed, 13 Nov 2013 23:23:23 +0000 (UTC) From: "Nick Dimiduk (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-3787) Increment is non-idempotent but client retries RPC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13821975#comment-13821975 ] Nick Dimiduk commented on HBASE-3787: ------------------------------------- I agree, this is a very important feature. I'd rather have it and fix any perf impact later than let is get stale again. This review is based on `interdiff v10 v11`, so please pardon any confused that comes about from a rebase. {noformat} + /** Dummy nonce generator for disabled nonces. */ + private static class NoNonceGenerator implements NonceGenerator { + @Override + public long getNonceGroup() { + return HConstants.NO_NONCE; + } + @Override + public long newNonce() { + return HConstants.NO_NONCE; + } + } {noformat} Love it. This is a great way to abstract this component. {noformat} +import java.sql.Date; +import java.text.SimpleDateFormat; {noformat} Did you mean {java.util.Date} ? TestRunnable is excellent. +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: Blocker > Attachments: HBASE-3787-partial.patch, HBASE-3787-v0.patch, HBASE-3787-v1.patch, HBASE-3787-v10.patch, HBASE-3787-v11.patch, HBASE-3787-v2.patch, HBASE-3787-v3.patch, HBASE-3787-v4.patch, HBASE-3787-v5.patch, HBASE-3787-v5.patch, HBASE-3787-v6.patch, HBASE-3787-v7.patch, HBASE-3787-v8.patch, HBASE-3787-v9.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 was sent by Atlassian JIRA (v6.1#6144)