Revfile vs Atomicity & Dumbfs
Martin Pool
mbp at sourcefrog.net
Tue May 10 03:03:03 BST 2005
On 9 May 2005, John A Meinel <john at arbash-meinel.com> wrote:
> Martin Pool wrote:
> >On 9 May 2005, John A Meinel <john at arbash-meinel.com> wrote:
> >
> >
> >>Although, I think the clone-and-replace method gets around this, since
> >>it already has to break hardlinks, but would preserve ones that haven't
> >>changed.
> >
> >
> >We can certainly do copy-append if we don't trust that just appending
> >to a revfile will be safe, but I don't see how that can ever occur.
>
> In your design docs you mention that you want hardlink trees to "just
> work", which means you can never just append.
You can never just append unless you want the same data to appear in
all trees. It's OK to have versions appear in the files of one tree
that aren't used there. The only file that needs to be not hard
linked is the revision-history.
> It seems that with a write-ahead-log you could get away without the
> later vacuum, because you would effectively vacuum as you go. Yes you
> could vacuum later, but that would require lots of locking to make sure
> the index gets rewritten inbetween the time you are rewriting the revlog
> file. If you always truncate bogus data, then you don't ever have the
> locking issue.
You can also truncate out bogus data with revfiles by just checking
that the last index entry is valid and matches the end of the data
file.
> How is it detected? Do you have a checksum? Or is it just if it points
> to something bogus?
There is a SHA-1 in each index line.
> I believe I understand your method of atomicity to be that appends don't
> matter until you write the final file, because they will just be
> ignored. I think you could be more proactive with a WAL and allow
> automatic corrections.
Maybe you could sketch out how WAL would work in more detail?
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050510/e5ef3e15/attachment.pgp
More information about the bazaar
mailing list