'bzr pack' should sync and delete obsolete-packs/*

Robert Collins robertc at robertcollins.net
Fri Jan 18 22:48:51 GMT 2008


On Fri, 2008-01-18 at 16:22 -0600, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > On Fri, 2008-01-18 at 11:56 -0600, John Arbash Meinel wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> I was just thinking about how 'bzr pack' rebuilds all of your pack
> >> files, and creates a new slightly optimized pack file. Which is great,
> >> but it means you instantly bloat your repository by 2x because you have
> >> a copy of everything.
> >>
> >> I think it would be reasonable for the last steps of 'bzr pack' to be a
> >> 'sync' call to flush everything to disk, and then delete everything in
> >> .bzr/repository/obsolete-packs
> >>
> >> Does that seem reasonable?
> > 
> > Seems dangerous to me.
> > 
> > -Rob
> 
> Even after doing the sync? Considering we will delete them in a few
> commits anyway, it would be nice if we didn't always have to double the
> repository size when we think we want to optimize.

I think that autopack should do some optimisations too, because it looks
like we will have enough spare overhead to do that sanely;

> I suppose we could have it optional and supply a flag to enable it.

I won't argue against that, though I do think that anyone running very
close to their hard disk limit has some problems - most file systems get
unhappy when nearly full.

> Do you have any specific concerns outside of sync not actually syncing
> because of the specifics of hard-drive/OS level caching? We can't be
> safe from that anyway.

The current system only deletes packed content after subsequent
operations have successfully accessed the repository in anger; this is a
very useful safety net to handle e.g. sftp append bugs, NFS, etc.

-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080119/62f7f9f7/attachment.pgp 


More information about the bazaar mailing list