[MERGE] Implement suspend_write_group/resume_write_group

Andrew Bennetts andrew.bennetts at canonical.com
Fri Feb 20 08:02:36 GMT 2009


Getting closer!  This patch is adds suspend_write_group and
resume_write_group to Repository.  Only pack repositories support this
currently.  When a pack write group is suspended, the pack file is renamed
and its indices written out as if it were properly inserted — but it remains
in the uploads directory, and pack-names is never updated.  The md5sum of
the pack file (which is also its filename, ignoring suffix) is the value of
the “write group token” that is returned.

When a pack write group is resumed, that pack file in the uploads directory
is reopened using code very similar to ExistingPack, although it also scans
the indices for any missing compression parents so that the versioned file
object can know what records are required to make the write group safe to
commit.

That's essentially it, aside from a bunch of test cases :)

There's some noise in the diff due to including a branch that has
almost-but-not-quite landed on bzr.dev.  I'll try to resend soon for
convenience if that branch really does land.

This is the culmination of a very large chunk of infrastructure to make
proper HPSS streaming push work.  This combined with the reworked fetch code
(that Robert has been polishing and landing) and the record stream
network-serialisation code gives us all the bits needed to do streaming push
properly.  I'm sure there's a lot of polish still to come, but it's getting
very close now!

-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: suspend-write-group-4015.patch
Type: text/x-diff
Size: 85508 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090220/8fdd5289/attachment-0001.bin 


More information about the bazaar mailing list