HBASE-3204 Reenable deferred log flush

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1031879 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2010-11-05 23:37:34 +00:00
parent 5f2c693b59
commit 374723813f
3 changed files with 16 additions and 5 deletions

View File

@ -655,6 +655,7 @@ Release 0.21.0 - Unreleased
HBASE-3198 Log rolling archives files prematurely HBASE-3198 Log rolling archives files prematurely
HBASE-3203 We can get an order to open a region while shutting down HBASE-3203 We can get an order to open a region while shutting down
and it'll hold up regionserver shutdown and it'll hold up regionserver shutdown
HBASE-3204 Reenable deferred log flush
IMPROVEMENTS IMPROVEMENTS

View File

@ -95,7 +95,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
public static final long DEFAULT_MAX_FILESIZE = 1024*1024*256L; 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 meta = null;
private volatile Boolean root = null; private volatile Boolean root = null;

View File

@ -872,8 +872,13 @@ public class HLog implements Syncable {
this.numEntries.incrementAndGet(); this.numEntries.incrementAndGet();
} }
// 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 // sync txn to file system
this.sync(regionInfo.isMetaRegion()); this.sync();
}
} }
/** /**
@ -924,8 +929,13 @@ public class HLog implements Syncable {
// Only count 1 row as an unflushed entry. // Only count 1 row as an unflushed entry.
this.unflushedEntries.incrementAndGet(); this.unflushedEntries.incrementAndGet();
} }
// 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 // sync txn to file system
this.sync(info.isMetaRegion()); this.sync();
}
} }
/** /**