Problem with repository
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 19 20:01:39 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Scott Aubrey wrote:
> Hi John
>
> Thanks for these. I found the .pack and .*ix files in obsolete_packs.
> copied them back to packs and indices respectively and did bzr check,
> bzr reconcile, all worked fine AFAIK.
>
> I took a copy of the repository before starting everything I did, is
> there anything I can do to help figure out what was going on? obviously,
> I didn't move the pack and index files there, so bazaar must have done
> something wrong, no?
>
> - Scott
>
It is supposed to only move files to obsolete packs once it has removed
them from pack-names.
The only thing I can think of is some sort of concurrency race that we
didn't catch. Either:
1) Hardware based. We issued "write pack-names; mv files", but the OS
decided to reorder them into "mv files; write pack-names" and
something happened that caused the second bit to fail (power outage,
etc).
The possibility of the OS reordering our requests and then failing to
complete all of them is one of the reasons why we move things to
obsolete packs, rather than just deleting them.
I don't know the actual likelyhood of this, nor what FS you are
using, or OS, or if you had a power outage, or...
2) Concurrency between bzr processes, such that we have a bug we don't
know about. I recently did a fair amount of work in this area. I
don't remember a case where we would have a process rename data out
of the way, and another put the old info back.
I do remember one where if a 'commit' saw a concurrent operation, it
would see that it needed to update its list of known pack files, and
would accidentally forget about the one it just generated. That
wouldn't trigger what you are seeing, though. (The file would be in
packs/* but *wouldn't* be referenced in pack-names.)
One interesting thing would be to do:
bzr dump-btree --raw
For all of your .rix data. And to see if the data that is in the
'obsoleted' pack file was actually all present in some other file. I
suspect that it would be (we should only ever mark something obsolete
once we know there is another copy of it being referenced). If so, then
removing the pack file from pack-names would have been just-as-correct.
If not, then we certainly need to investigate further.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvMqJMACgkQJdeBCYSNAAMMhgCg2agtW7VbJpNsH3vk1a5lLqp5
KS0AoM2Of8L/+QWWxrrnIwFJXTWWalFe
=zwz/
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list