FOSDEM / bzr gc

Robert Collins robertc at robertcollins.net
Mon Feb 2 00:46:43 GMT 2009


On Sun, 2009-02-01 at 22:28 +0100, Wouter van Heyst wrote:
> Heya,
> 
> a couple of us are going to be present at FOSDEM next weekend. I'm aware
> of at least Jelmer Vernooij, Roland Mas, John Carr and myself (and some
> friends of Jelmer and mine that aren't really active in the community).
> 
> There is interest in working on bzr-git there, I intend to spend time on
> nested-trees and I just convinced Roland to take a stab at `bzr gc`
> together :)
> 
> As far as I know, the closest we've come to gc is doc/developers/gc.txt,
> (re)packing and the remove-revisions plugin. Am I correct in that
> thinking, or should we start from somewhere else?

gc.txt suggests replacing the entire repo, thats true in the general
case but we can do better for packs.

Specifically, write a new pack containing all packs with content to
remove, without the removed content.
take a names file lock
check the names list has only changed in a safe way(*)
  if it has not error-or-start-over
add the new pack, and obsolete the packs it subsumed
release the names lock

this is safe and faster; but only works for repositories with atomic
insertion; it may still break concurrent readers, but we can't tell when
folk are reading - however they can retrieve the gc'd content from
obsolete_packs if needed, at least up to the next obsoleting operation.

(*) safe names list changes:
 - no change (no op)
 - remove a pack that we're not removing ourselves
 - add a new pack that does not contain references to any content we are
   removing

-Rob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090202/7c5e2c24/attachment.pgp 


More information about the bazaar mailing list