hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r937589 - in /hadoop/hbase/trunk: CHANGES.txt core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Date Sat, 24 Apr 2010 04:24:54 GMT
Author: stack
Date: Sat Apr 24 04:24:53 2010
New Revision: 937589

URL: http://svn.apache.org/viewvc?rev=937589&view=rev
Log:
HBASE-2447 LogSyncer.addToSyncQueue doesn't check if syncer is still running before waiting

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=937589&r1=937588&r2=937589&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sat Apr 24 04:24:53 2010
@@ -283,6 +283,8 @@ Release 0.21.0 - Unreleased
                (Benoit Sigoure via Stack)
    HBASE-2443  IPC client can throw NPE if socket creation fails
                (Todd Lipcon via Stack)
+   HBASE-2447  LogSyncer.addToSyncQueue doesn't check if syncer is still
+               running before waiting (Todd Lipcon via Stack)
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=937589&r1=937588&r2=937589&view=diff
==============================================================================
--- hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Sat Apr 24 04:24:53 2010
@@ -1866,8 +1866,14 @@ public class HRegion implements HConstan
       }
       results.clear();
       boolean returnResult = nextInternal(limit);
-      if (!returnResult && filter != null && filter.filterRow()) {
-        results.clear();
+      if (!returnResult && filter != null) {
+        // final chance to modify row contents
+    	returnResult = filter.filterRow(results);
+    	// final chance to drop the row... This may be superfluous with the addition of the
above?
+    	// still needed for backwards compatibility however
+    	if (returnResult || filter.filterRow()) {
+    	  results.clear();
+    	}
       }
       outResults.addAll(results);
       resetFilters();

Modified: hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=937589&r1=937588&r2=937589&view=diff
==============================================================================
--- hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
(original)
+++ hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Sat Apr 24 04:24:53 2010
@@ -742,6 +742,8 @@ public class HLog implements HConstants,
 
     private final long optionalFlushInterval;
 
+    private boolean syncerShuttingDown = false;
+
     LogSyncer(long optionalFlushInterval) {
       this.optionalFlushInterval = optionalFlushInterval;
     }
@@ -778,6 +780,7 @@ public class HLog implements HConstants,
       } catch (InterruptedException e) {
         LOG.debug(getName() + "interrupted while waiting for sync requests");
       } finally {
+        syncerShuttingDown = true;
         syncDone.signalAll();
         lock.unlock();
         LOG.info(getName() + " exiting");
@@ -796,6 +799,10 @@ public class HLog implements HConstants,
       }
       lock.lock();
       try {
+        if (syncerShuttingDown) {
+          LOG.warn(getName() + " was shut down while waiting for sync");
+          return;
+        }
         if(force) {
           forceSync = true;
         }



Mime
View raw message