hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject hbase git commit: HBASE-15451 Remove unnecessary wait in MVCC
Date Sat, 19 Mar 2016 18:43:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 6977c5dee -> 463374ecf


HBASE-15451 Remove unnecessary wait in MVCC


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/463374ec
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/463374ec
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/463374ec

Branch: refs/heads/branch-1
Commit: 463374ecfa770645c7098b4648cb805933eb7aab
Parents: 6977c5d
Author: Yu Li <liyu@apache.org>
Authored: Sat Mar 19 21:24:07 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Sun Mar 20 02:42:44 2016 +0800

----------------------------------------------------------------------
 .../hbase/regionserver/MultiVersionConcurrencyControl.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/463374ec/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConcurrencyControl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConcurrencyControl.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConcurrencyControl.java
index da9c57a..d65af00 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConcurrencyControl.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConcurrencyControl.java
@@ -146,8 +146,9 @@ public class MultiVersionConcurrencyControl {
    * of the passed in WriteEntry.  Thus, the write is visible to MVCC readers.
    */
   public void completeAndWait(WriteEntry e) {
-    complete(e);
-    waitForRead(e);
+    if (!complete(e)) {
+      waitForRead(e);
+    }
   }
 
   /**


Mime
View raw message