hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r791979 - in /hadoop/hbase/branches/0.19: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/MemcacheFlusher.java
Date Tue, 07 Jul 2009 21:08:40 GMT
Author: stack
Date: Tue Jul  7 21:08:40 2009
New Revision: 791979

URL: http://svn.apache.org/viewvc?rev=791979&view=rev
Log:
HBASE-1618 Investigate further into the MemStoreFlusher StoreFile limit

Modified:
    hadoop/hbase/branches/0.19/CHANGES.txt
    hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/MemcacheFlusher.java

Modified: hadoop/hbase/branches/0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/CHANGES.txt?rev=791979&r1=791978&r2=791979&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.19/CHANGES.txt Tue Jul  7 21:08:40 2009
@@ -17,6 +17,8 @@
                (Qiaoilang Xiang via Stack)
    HBASE-1573  Holes in master state change; updated startcode and server go
                into .META. but catalog scanner just got old values
+   HBASE-1618  Investigate further into the MemStoreFlusher StoreFile limit
+               (Jon Gray via Stack)
 
 Release 0.19.3 - May 27th, 2009
   BUG FIXES

Modified: hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/MemcacheFlusher.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/MemcacheFlusher.java?rev=791979&r1=791978&r2=791979&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/MemcacheFlusher.java
(original)
+++ hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/MemcacheFlusher.java
Tue Jul  7 21:08:40 2009
@@ -224,28 +224,37 @@
     // Wait until it is safe to flush
     int count = 0;
     boolean triggered = false;
+    boolean finished = false;
     while (count++ < (blockingWaitTime / 500)) {
       for (HStore hstore: region.stores.values()) {
         if (hstore.getStorefilesCount() > this.blockingStoreFilesNumber) {
+          // always request a compaction
+          server.compactSplitThread.compactionRequested(region, getName());
+          // only log once
           if (!triggered) {
-            server.compactSplitThread.compactionRequested(region, getName());
             LOG.info("Too many store files for region " + region + ": " +
-              hstore.getStorefilesCount() + ", waiting");
+              hstore.getStorefilesCount() + ", requesting compaction and " +
+              "waiting");
             triggered = true;
           }
+          // pending compaction, not finished
+          finished = false;
           try {
             Thread.sleep(500);
           } catch (InterruptedException e) {
             // ignore
           }
-          continue;
         }
       }
-      if (triggered) {
-        LOG.info("Compaction completed on region " + region +
-          ", proceeding");
+      if(triggered && finished) {
+        LOG.info("Compaction has completed, we waited " + (count * 500) + "ms, "
+            + "finishing flush of region " + region);
+        break;
       }
-      break;
+    }
+    if(triggered && !finished) {
+      LOG.warn("Tried to hold up flushing for compactions of region " + region +
+          " but have waited longer than " + blockingWaitTime + "ms, continuing");
     }
     synchronized (regionsInQueue) {
       // See comment above for removeFromQueue on why we do not



Mime
View raw message