diff --git a/CHANGES.txt b/CHANGES.txt index 9f3bc9d8f9c..b6e1ea2a615 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/src/java/org/apache/hadoop/hbase/regionserver/HStore.java b/src/java/org/apache/hadoop/hbase/regionserver/HStore.java index 1be0cb30b03..9a97196be00 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/HStore.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/HStore.java @@ -617,6 +617,11 @@ public class HStore implements HConstants { private void internalFlushCache(SortedMap 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,