hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r937588 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HLog.java
Date Sat, 24 Apr 2010 04:16:20 GMT
Author: stack
Date: Sat Apr 24 04:16:17 2010
New Revision: 937588

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

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=937588&r1=937587&r2=937588&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Sat Apr 24 04:16:17 2010
@@ -94,6 +94,8 @@ Release 0.20.4 - Unreleased
    HBASE-2443  IPC client can throw NPE if socket creation fails
                (Todd Lipcon via Stack)
    HBASE-2474  Bug in 2248 - mixed version reads (not allowed by spec)
+   HBASE-2447  LogSyncer.addToSyncQueue doesn't check if syncer is still
+               running before waiting (Todd Lipcon via Stack)
 
   IMPROVEMENTS
    HBASE-2180  Bad read performance from synchronizing hfile.fddatainputstream

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java?rev=937588&r1=937587&r2=937588&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java Sat
Apr 24 04:16:17 2010
@@ -759,6 +759,8 @@ public class HLog implements HConstants,
 
     private final long optionalFlushInterval;
 
+    private boolean syncerShuttingDown = false;
+
     LogSyncer(long optionalFlushInterval) {
       this.optionalFlushInterval = optionalFlushInterval;
     }
@@ -795,6 +797,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");
@@ -813,6 +816,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