You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by sy...@apache.org on 2016/06/17 05:02:06 UTC

[24/30] hbase git commit: HBASE-15999 NPE in MemstoreCompactor (Ram)

HBASE-15999 NPE in MemstoreCompactor (Ram)


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

Branch: refs/heads/hbase-12439
Commit: f19f1d9e99c8058f6ef5caa42c1b07a8ae1de53f
Parents: 158568e
Author: Ramkrishna <ra...@intel.com>
Authored: Thu Jun 16 10:06:40 2016 +0530
Committer: Ramkrishna <ra...@intel.com>
Committed: Thu Jun 16 10:06:40 2016 +0530

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/CompactingMemStore.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f19f1d9e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
index d47ac36..ec5684d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
@@ -253,10 +253,11 @@ public class CompactingMemStore extends AbstractMemStore {
       * in exclusive mode while this method (checkActiveSize) is invoked holding updatesLock
       * in the shared mode. */
       InMemoryFlushRunnable runnable = new InMemoryFlushRunnable();
-      LOG.info("Dispatching the MemStore in-memory flush for store " + store.getColumnFamilyName());
+      if (LOG.isTraceEnabled()) {
+        LOG.trace(
+          "Dispatching the MemStore in-memory flush for store " + store.getColumnFamilyName());
+      }
       getPool().execute(runnable);
-      // guard against queuing same old compactions over and over again
-      inMemoryFlushInProgress.set(true);
     }
   }
 
@@ -277,10 +278,9 @@ public class CompactingMemStore extends AbstractMemStore {
     }
     // Phase II: Compact the pipeline
     try {
-      if (allowCompaction.get()) {
+      if (allowCompaction.get() && inMemoryFlushInProgress.compareAndSet(false, true)) {
         // setting the inMemoryFlushInProgress flag again for the case this method is invoked
         // directly (only in tests) in the common path setting from true to true is idempotent
-        inMemoryFlushInProgress.set(true);
         // Speculative compaction execution, may be interrupted if flush is forced while
         // compaction is in progress
         compactor.startCompaction();