/[Apache-SVN]
ViewVC logotype

Revision 1196773


Jump to revision: Previous Next
Author: nspiegelberg
Date: Wed Nov 2 19:24:23 2011 UTC (12 years, 11 months ago)
Changed paths: 7
Log Message:
HBASE-2312 [jira] Possible data loss when RS goes into GC pause while rolling
HLog

Summary:
There is a very corner case when bad things could happen(ie data loss):

1)	RS #1 is going to roll its HLog - not yet created the new one, old one will
get no more writes
2)	RS #1 enters GC Pause of Death
3)	Master lists HLog files of RS#1 that is has to split as RS#1 is dead, starts
splitting
4)	RS #1 wakes up, created the new HLog (previous one was rolled) and appends an
edit - which is lost

The following seems like a possible solution:

1)	Master detects RS#1 is dead
2)	The master renames the /hbase/.logs/<regionserver name>  directory to
something else (say /hbase/.logs/<regionserver name>-dead)
3)	Add mkdir support (as opposed to mkdirs) to HDFS - so that a file create
fails if the directory doesn't exist. Dhruba tells me this is very doable.
4)	RS#1 comes back up and is not able create the new hlog. It restarts itself.

Test Plan: EMPTY
Reviewers: JIRA, stack, khemani
Reviewed By: khemani
CC: tedyu, nspiegelberg, stack, Kannan, khemani, jgray
Differential Revision: 99

Changed paths

Path Details
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SequenceFileLogWriter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java modified , text changed
Directoryhbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26