You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2016/08/09 14:09:51 UTC
hbase git commit: HBASE-9899 for idempotent operation dups,
return the result instead of throwing conflict exception (Guanghao
Zhang): ADDENDUM
Repository: hbase
Updated Branches:
refs/heads/master 5cadcd59a -> 46defe8e3
HBASE-9899 for idempotent operation dups, return the result instead of throwing conflict exception (Guanghao Zhang): ADDENDUM
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/46defe8e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/46defe8e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/46defe8e
Branch: refs/heads/master
Commit: 46defe8e31278f91b5b92c24744b1839da564f27
Parents: 5cadcd5
Author: stack <st...@apache.org>
Authored: Tue Aug 9 07:09:44 2016 -0700
Committer: stack <st...@apache.org>
Committed: Tue Aug 9 07:09:44 2016 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/regionserver/RSRpcServices.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/46defe8e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index d87ada4..681b1dc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -620,12 +620,13 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
boolean canProceed = startNonceOperation(mutation, nonceGroup);
boolean success = false;
try {
+ long nonce = mutation.hasNonce() ? mutation.getNonce() : HConstants.NO_NONCE;
if (canProceed) {
- r = region.append(append, nonceGroup, mutation.getNonce());
+ r = region.append(append, nonceGroup, nonce);
} else {
// convert duplicate append to get
List<Cell> results = region.get(ProtobufUtil.toGet(mutation, cellScanner), false,
- nonceGroup, mutation.getNonce());
+ nonceGroup, nonce);
r = Result.create(results);
}
success = true;
@@ -667,12 +668,13 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
boolean canProceed = startNonceOperation(mutation, nonceGroup);
boolean success = false;
try {
+ long nonce = mutation.hasNonce() ? mutation.getNonce() : HConstants.NO_NONCE;
if (canProceed) {
- r = region.increment(increment, nonceGroup, mutation.getNonce());
+ r = region.increment(increment, nonceGroup, nonce);
} else {
// convert duplicate increment to get
List<Cell> results = region.get(ProtobufUtil.toGet(mutation, cells), false, nonceGroup,
- mutation.getNonce());
+ nonce);
r = Result.create(results);
}
success = true;