hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r830786 - /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Date Wed, 28 Oct 2009 22:44:47 GMT
Author: jdcryans
Date: Wed Oct 28 22:44:46 2009
New Revision: 830786

URL: http://svn.apache.org/viewvc?rev=830786&view=rev
Log:
HBASE-1936  HLog group commit, fixed

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=830786&r1=830785&r2=830786&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Wed Oct
28 22:44:46 2009
@@ -759,8 +759,9 @@
         LOG.error("Error while syncing, requesting close of hlog ", e);
         requestLogRoll();
       } catch (InterruptedException e) {
-        LOG.debug(getName() + "interrupted while waiting for sync requests",e );
+        LOG.debug(getName() + "interrupted while waiting for sync requests");
       } finally {
+        syncDone.signalAll();
         lock.unlock();
         LOG.info(getName() + " exiting");
       }
@@ -792,7 +793,7 @@
     }
   }
 
-  public void sync() throws IOException {
+  public void sync(){
     sync(false);
   }
 
@@ -800,11 +801,11 @@
    * This method calls the LogSyncer in order to group commit the sync
    * with other threads.
    * @param force For catalog regions, force the sync to happen
-   * @throws IOException
    */
-  public void sync(boolean force) throws IOException {
-    // Set force sync if force is true and forceSync is false
-    forceSync.compareAndSet(!forceSync.get() && force, true);
+  public void sync(boolean force) {
+    // Set to force only if it was false and force == true
+    // It is reset to false after sync
+    forceSync.compareAndSet(!forceSync.get() && !force, true);
     logSyncerThread.addToSyncQueue();
   }
 



Mime
View raw message