obsolete-packs with knitpack-experimental repository format

John Arbash Meinel john at arbash-meinel.com
Tue Nov 13 19:28:17 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adam Mercer wrote:
> Hi
> 
> I've converted a few of my branches over to the knitpack-experimental
> format and am so far very pleased with the results, I do however have
> a question regarding the obsolete-packs directory within
> .bzr/repository directory.
> 
> According to the documentation at
> <http://doc.bazaar-vcs.org/latest/developers/knitpack.html> the
> obsolete-packs directory contains "packs that have been repacked and
> are no longer normally needed". Under what circumstances could these
> packs be needed and is it safe to remove these?
> 
> Cheers
> 
> Adam

We keep them around mostly for a safety check. Specifically, we have
already given an os-level write() call to write the contents into a
different file. However, most systems don't guarantee ordering of
operations. And it gets worse when you do so over the network.

So once the contents of the new packs have actually been written to
disk, then it is safe to delete those files.

I don't think it made it into 0.92, but the current bzr.dev code uses
the logic: if about to obsolete some more packs, first delete all
existing obsoleted packs.

At the moment, we automatically repack after the packs get a bit spread
out, which is approximately every 10th commit. (It will be different if
you are pushing, pulling, merging, etc as fetch() will create packs with
more data in them, and thus less need to repack.)

So if you just want to do housekeeping, a simple "sync()" followed by rm
.bzr/repository/obsolete-packs/* should be fine.
If you are using 0.92, you might want to just switch to bzr.dev, so that
we will do a reasonable amount of housekeeping for you.

It is bzr.dev revno 2975 which merged Robert's update on 2007-11-07.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOfrRJdeBCYSNAAMRAqOiAJ4631d9wXPxm9NoZMhmUoNpVPg6FACeMUY4
V2+CL79GBkt8BrmqPpoVl1Y=
=uVT6
-----END PGP SIGNATURE-----



More information about the bazaar mailing list