hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1031879 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Date Fri, 05 Nov 2010 23:37:35 GMT
Author: jdcryans
Date: Fri Nov  5 23:37:34 2010
New Revision: 1031879

URL: http://svn.apache.org/viewvc?rev=1031879&view=rev
Log:
HBASE-3204  Reenable deferred log flush

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

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1031879&r1=1031878&r2=1031879&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Nov  5 23:37:34 2010
@@ -655,6 +655,7 @@ Release 0.21.0 - Unreleased
    HBASE-3198  Log rolling archives files prematurely
    HBASE-3203  We can get an order to open a region while shutting down
                and it'll hold up regionserver shutdown
+   HBASE-3204  Reenable deferred log flush
 
 
   IMPROVEMENTS

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=1031879&r1=1031878&r2=1031879&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java Fri Nov  5 23:37:34
2010
@@ -95,7 +95,7 @@ public class HTableDescriptor implements
 
   public static final long DEFAULT_MAX_FILESIZE = 1024*1024*256L;
 
-  public static final boolean DEFAULT_DEFERRED_LOG_FLUSH = true;
+  public static final boolean DEFAULT_DEFERRED_LOG_FLUSH = false;
 
   private volatile Boolean meta = null;
   private volatile Boolean root = null;

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1031879&r1=1031878&r2=1031879&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Fri Nov 
5 23:37:34 2010
@@ -872,8 +872,13 @@ public class HLog implements Syncable {
       this.numEntries.incrementAndGet();
     }
 
-    // sync txn to file system
-    this.sync(regionInfo.isMetaRegion());
+    // Sync if catalog region, and if not then check if that table supports
+    // deferred log flushing
+    if (regionInfo.isMetaRegion() ||
+        !regionInfo.getTableDesc().isDeferredLogFlush()) {
+      // sync txn to file system
+      this.sync();
+    }
   }
 
   /**
@@ -924,8 +929,13 @@ public class HLog implements Syncable {
       // Only count 1 row as an unflushed entry.
       this.unflushedEntries.incrementAndGet();
     }
-    // sync txn to file system
-    this.sync(info.isMetaRegion());
+    // Sync if catalog region, and if not then check if that table supports
+    // deferred log flushing
+    if (info.isMetaRegion() ||
+        !info.getTableDesc().isDeferredLogFlush()) {
+      // sync txn to file system
+      this.sync();
+    }
   }
 
   /**



Mime
View raw message