HBASE-564 Don't do a cache flush if there are zero entries in the cache.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@645690 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-04-07 21:08:48 +00:00
parent 2da5e018af
commit 7813444a9b
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@ Hbase Change Log
HBASE-563 TestRowFilterAfterWrite erroneously sets master address to
0.0.0.0:60100 rather than relying on conf
HBASE-507 Use Callable pattern to sleep between retries
HBASE-564 Don't do a cache flush if there are zero entries in the cache.
NEW FEATURES
HBASE-548 Tool to online single region

View File

@ -617,6 +617,11 @@ public class HStore implements HConstants {
private void internalFlushCache(SortedMap<HStoreKey, byte []> cache,
long logCacheFlushId) throws IOException {
// Don't flush if there are no entries.
if (cache.size() == 0) {
return;
}
synchronized(flushLock) {
// A. Write the Maps out to the disk
HStoreFile flushedFile = new HStoreFile(conf, fs, basedir,