From 7daffb3a429f1854ecdef504be3f454be8ba75d2 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 20 Sep 2010 18:43:13 +0000 Subject: [PATCH] HBASE-3015 recovered.edits files not deleted if it only contain edits that have already been flushed; hurts perf for all future opens of the region git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@999046 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ .../apache/hadoop/hbase/regionserver/HRegion.java | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 57a236e4be9..796a42c3210 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -527,6 +527,9 @@ Release 0.21.0 - Unreleased calls severly impacting performance (Kannan Muthukkaruppan via Stack) HBASE-3010 Can't start/stop/start... cluster using new master + HBASE-3015 recovered.edits files not deleted if it only contain edits that + have already been flushed; hurts perf for all future opens of + the region IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index fdef130ca3d..0e7ef70aab5 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -1763,12 +1763,13 @@ public class HRegion implements HeapSize { // , Writable{ if (seqid > minSeqId) { // Then we added some edits to memory. Flush and cleanup split edit files. internalFlushcache(null, seqid); - for (Path file: files) { - if (!this.fs.delete(file, false)) { - LOG.error("Failed delete of " + file); - } else { - LOG.debug("Deleted recovered.edits file=" + file); - } + } + // Now delete the content of recovered edits. We're done w/ them. + for (Path file: files) { + if (!this.fs.delete(file, false)) { + LOG.error("Failed delete of " + file); + } else { + LOG.debug("Deleted recovered.edits file=" + file); } } return seqid;