Karthik Ranganathan 2010-03-16, 18:13
tsuna 2010-03-16, 19:04
Ryan Rawson 2010-03-16, 20:17
Stack 2010-03-16, 20:49
Todd Lipcon 2010-03-16, 22:17
Karthik Ranganathan 2010-03-17, 01:04
Option #1 seems easy to reason about and simple to implement. Can we go ahead with that if there is no major objection?
From: Karthik Ranganathan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 16, 2010 6:05 PM
To: [EMAIL PROTECTED]
Subject: RE: HBASE-2312 discussion
@Stack: With the overwrite=false, I think option #2 looks fine.
@Todd: By "bound number of log files", I meant that the if the latest log file is log.N, the master would try to open log.N+1, log.N+2, log.N+3 etc until one of it succeeds and the RS cannot open more log files after that one. So the master "bounds" the number of times the log file is opened.
I am a little nervous about the master backing off on detecting the RS's progress - because the RS has already lost its zk lease. Not sure that if the master backs off, this will allow everything to proceed smoothly. But probably calling sync() on zk makes sense. Will think about this some more.
I too like option #3 because it's a useful pattern, but it was initially much easier to reason about #2. Of course #1 is the easiest either way. Again, let me think about this more.
From: Todd Lipcon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 16, 2010 3:18 PM
To: [EMAIL PROTECTED]
Subject: Re: HBASE-2312 discussion
On Tue, Mar 16, 2010 at 1:49 PM, Stack <[EMAIL PROTECTED]> wrote:
> Thanks for looking into this.
> Reading over the issue, you think option #2 "not clean" before Todd
> proposes changing overwrite to false. Do you still think it so? If
> not, then option #2 seems straight-forward.
> While option #3 is more code, its attractive in that its a pattern we
> might take on to solve other filesystem transitions; e.g. recovering
> failed compactions. Do you think option #3 harder to verify? The
> 'chasing logs' would be hard to do up in tests.
I think the "chasing logs" thing is actually avoidable pretty easily. I
commented on HBASE-2312 with thoughts there.
Regarding option 1, I'm not entirely against the new HDFS API, so if others
think it's a good solution we may as well go with it (we're already
requiring patched HDFS for sync, so another simple patch isn't a huge deal).
Regarding option 2, not sure what you mean be "The number of log files the
RS can create will be bound." -- can you explain?
Stack's point that #3 is a useful pattern for lots of transitions seems very
valid to me as well.
> P.S. Tsuna, up https://issues.apache.org/jira/browse/HBASE-2238 there
> is some discussion of why hdfs state changes has to be managed in the
> filesystem only, of how state can't bridge filesystem and zookeeper.
> On Tue, Mar 16, 2010 at 11:13 AM, Karthik Ranganathan
> <[EMAIL PROTECTED]> wrote:
> > Hey guys,
> > Just wanted to close on which solution we wanted to pick for this issue -
> I was thinking about working on this one. There are 3 possibilities here. I
> have briefly written up the issue and the three solutions below.
> > Issue:
> > 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
> > Solution 1:
> > 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
> > 4) RS#1 comes back up and is not able create the new hlog. It restarts
> > NOTE: Need another HDFS API to be supported, Todd wants to avoid this.
Software Engineer, Cloudera
Todd Lipcon 2010-03-17, 01:08
Stack 2010-03-17, 03:59
Todd Lipcon 2010-03-17, 05:08
Karthik Ranganathan 2010-03-17, 17:21
Ryan Rawson 2010-03-17, 17:48
Todd Lipcon 2010-03-17, 17:55
Ryan Rawson 2010-03-17, 18:38
Todd Lipcon 2010-03-17, 21:59
Todd Lipcon 2010-03-17, 23:29
Dhruba Borthakur 2010-03-17, 04:39