You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ra...@apache.org on 2014/09/01 13:48:33 UTC

git commit: HBASE-11591 - Addendum based on HBASE-11894

Repository: hbase
Updated Branches:
  refs/heads/branch-1 58b5bce17 -> 14fad0304


HBASE-11591 - Addendum based on HBASE-11894


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

Branch: refs/heads/branch-1
Commit: 14fad03045c0ad209323515abeb1bc13575efb25
Parents: 58b5bce
Author: Ramkrishna <ra...@intel.com>
Authored: Mon Sep 1 17:16:49 2014 +0530
Committer: Ramkrishna <ra...@intel.com>
Committed: Mon Sep 1 17:18:03 2014 +0530

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/HRegion.java      | 42 ++++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/14fad030/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 658c1c6..6acfa20 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -1745,32 +1745,32 @@ public class HRegion implements HeapSize { // , Writable{
       this.updatesLock.writeLock().lock();
       try {
         if (this.memstoreSize.get() <= 0) {
-          // Presume that if there are still no edits in the memstore, then there are no edits for
-          // this region out in the WAL/HLog subsystem so no need to do any trickery clearing out
-          // edits in the WAL system. Up the sequence number so the resulting flush id is for
-          // sure just beyond the last appended region edit (useful as a marker when bulk loading,
+          // Presume that if there are still no edits in the memstore, then
+          // there are no edits for
+          // this region out in the WAL/HLog subsystem so no need to do any
+          // trickery clearing out
+          // edits in the WAL system. Up the sequence number so the resulting
+          // flush id is for
+          // sure just beyond the last appended region edit (useful as a marker
+          // when bulk loading,
           // etc.)
           // wal can be null replaying edits.
-          try {
-            if (wal != null) {
-              w = mvcc.beginMemstoreInsert();
-              long flushSeqId = getNextSequenceId(wal);
-              FlushResult flushResult = new FlushResult(
-                  FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY, flushSeqId, "Nothing to flush");
-              w.setWriteNumber(flushSeqId);
-              mvcc.waitForPreviousTransactionsComplete(w);
-              w = null;
-              return flushResult;
-            } else {
-              return new FlushResult(FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY,
-                  "Nothing to flush");
-            }
-
-          } finally {
-            this.updatesLock.writeLock().unlock();
+          if (wal != null) {
+            w = mvcc.beginMemstoreInsert();
+            long flushSeqId = getNextSequenceId(wal);
+            FlushResult flushResult = new FlushResult(
+                FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY, flushSeqId, "Nothing to flush");
+            w.setWriteNumber(flushSeqId);
+            mvcc.waitForPreviousTransactionsComplete(w);
+            w = null;
+            return flushResult;
+          } else {
+            return new FlushResult(FlushResult.Result.CANNOT_FLUSH_MEMSTORE_EMPTY,
+                "Nothing to flush");
           }
         }
       } finally {
+        this.updatesLock.writeLock().unlock();
         if (w != null) {
           mvcc.advanceMemstore(w);
         }