From 198a156334f024d6afbba103c6147bc24c613376 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 31 Mar 2008 20:47:47 +0000 Subject: [PATCH] HBASE-551 Master stuck splitting server logs in shutdown loop; on eachiteration, edits are aggregated up into the millions M src/java/org/apache/hadoop/hbase/HLog.java (splitLog): If an exception processing a split, catch it. In finally, close and delete the split. Don't try retrying. While in some circumstance, we might recover, its also likely that we just get same exception again. If so, and multiple files, we'll just accumulate edits until the kingdom comes. git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643142 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 8 +++++++- .../apache/hadoop/hbase/regionserver/HLog.java | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8ecee277c16..cd25baa9c02 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,12 @@ Hbase Change Log + BUG FIXES + HBASE-550 EOF trying to read reconstruction log stops region deployment + HBASE-551 Master stuck splitting server logs in shutdown loop; on each + iteration, edits are aggregated up into the millions + +Release 0.1.0 + INCOMPATIBLE CHANGES HBASE-288 Add in-memory caching of data. Required update of hadoop to 0.17.0-dev.2008-02-07_12-01-58. (Tom White via Stack) @@ -105,7 +112,6 @@ Hbase Change Log HBASE-529 RegionServer needs to recover if datanode goes down HBASE-456 Clearly state which ports need to be opened in order to run HBase HBASE-536 Remove MiniDFS startup from MiniHBaseCluster - HBASE-550 EOF trying to read reconstruction log stops region deployment Branch 0.1 diff --git a/src/java/org/apache/hadoop/hbase/regionserver/HLog.java b/src/java/org/apache/hadoop/hbase/regionserver/HLog.java index 20ef00bd97f..a2a6f4055ae 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/HLog.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/HLog.java @@ -596,8 +596,21 @@ public class HLog implements HConstants { if (LOG.isDebugEnabled()) { LOG.debug("Applied " + count + " total edits"); } + } catch (IOException e) { + LOG.warn("Exception processing " + logfiles[i].getPath() + + " -- continuing. Possible DATA LOSS!", e); } finally { - in.close(); + try { + in.close(); + } catch (IOException e) { + LOG.warn("Close in finally threw exception -- continuing", e); + } + // Delete the input file now so we do not replay edits. We could + // have gotten here because of an exception. If so, probably + // nothing we can do about it. Replaying it, it could work but we + // could be stuck replaying for ever. Just continue though we + // could have lost some edits. + fs.delete(logfiles[i].getPath()); } } } finally {