somewhat reproducible bzr errors

Martin Pool mbp at sourcefrog.net
Thu Oct 11 04:53:15 BST 2007


On 10/11/07, Sabin Iacob <iacobs at m0n5t3r.info> wrote:
> Hi, list
>
> It looks like every time my computer crashes and has to be rebooted, or
> refuses to wake up from suspend to ram, my branches that were modified
> since the last reboot (both svn and dirstate-tags formats) make bzr
> log/pull/push/missing/etc say this:
>
> bzr: ERROR: Revision
> {iacobs at m0n5t3r.info-20071010112624-gp8gq6id405m94v7} not present in
> revisions.
>
> I suppose it's some XFS "feature" at work; is there any way to fix such
> a branch? I rarely have to recover more than 10 revisions that are not
> pushed to the master branch (the code is ok), but it's still rather
> annoying. Does anyone else have the same problem? Can repositories be
> made a bit less fragile?

It sounds like the data is just being lost before being written to
disk.  I suggest that you just run the 'sync' command after each
commit, to make sure that it's really flushed to disk.  (At least,
it's meant to do that, you may need to check that it actually works.)
You might also be able to find a mount or fs option that will reduce
the cache time - for ext3 you can use commit=SECS.

We don't automatically fsync after committing because it's slow and
not needed on reasonably-behaved machines.  However I wouldn't object
to a command line or configuration option that turns that on.

I believe xfs caches very aggressively on the assumption it will only
be used on machines which never unexpectedly halt.  So maybe it's not
such a good choice for your situation.

-- 
Martin



More information about the bazaar mailing list