3 ms·
I understand the problem scenario with ext3/ext4 journalling you're referring to here and below. However, HN runs on FreeBSD, and my understanding is that the
by sigil 12y ago
I understand the problem scenario with ext3/ext4 journalling you're referring to here and below.
However, HN runs on FreeBSD, and my understanding is that the combination of soft-updates + journalling there actually do provide atomic rename, even in the case of catastrophic failure. McKusick talks about it here: http://www.mckusick.com/softdep/suj.pdf http://www.mckusick.com/softdep/suj.pdf
Also, just to anchor the discussion a bit, the HN code does use the "write foo.tmp; mv foo.tmp foo" trick all over the place. (Or at least, the most recent version of news.arc I've seen does.)
https://github.com/wting/hackernews/blob/master/arc.arc#L841 https://github.com/wting/hackernews/blob/master/arc.arc#L841
- _wmd 12y agoYou said POSIX, which makes no such guarantee.. soft updates are cool, though as far as I know they still don't provide durability. Still, that's far better than the default Linux behaviour