hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HBase Review Board (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2312) Possible data loss when RS goes into GC pause while rolling HLog
Date Wed, 28 Jul 2010 06:18:18 GMT

    [ https://issues.apache.org/jira/browse/HBASE-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893074#action_12893074
] 

HBase Review Board commented on HBASE-2312:
-------------------------------------------

Message from: "Nicolas" <nspiegelberg@facebook.com>

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/396/
-----------------------------------------------------------

Review request for hbase.


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

Note that this fix requires a healthy dose of HDFS prerequisites: HDFS-617, HADOOP-6840, HADOOP-6886.
 I encourage you to review those as well, give feedback, and hopefully give +1s so we can
push the changes through.


This addresses bug HBASE-2312.
    http://issues.apache.org/jira/browse/HBASE-2312


Diffs
-----

  trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 979953 
  trunk/src/main/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java 979953 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java 979953 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SequenceFileLogWriter.java
979953 
  trunk/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java 979953 

Diff: http://review.cloudera.org/r/396/diff


Testing
-------

mvn test;
bin/start-hbase.sh
bin/hbase shell < scan '.META.', get, put, etc


Thanks,

Nicolas




> Possible data loss when RS goes into GC pause while rolling HLog
> ----------------------------------------------------------------
>
>                 Key: HBASE-2312
>                 URL: https://issues.apache.org/jira/browse/HBASE-2312
>             Project: HBase
>          Issue Type: Bug
>          Components: master, regionserver
>    Affects Versions: 0.20.3
>            Reporter: Karthik Ranganathan
>            Assignee: Nicolas Spiegelberg
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message