Introduction to history deltas

Martin Pool mbp at sourcefrog.net
Tue Dec 6 13:01:17 GMT 2005


On  6 Dec 2005, Jan Hudec <bulb at ucw.cz> wrote:
> On Tue, Dec 06, 2005 at 01:10:13 -0500, Aaron Bentley wrote:

> There is one interesting point in the original suggestion: Instead of
> storing all chunks for a file together, it stores all chunks for a
> revision together. That would spead up remote transactions, because
> you'd not have to copy all the files to create their new versions
> atomically, but instead atomically install one file. For reading, index
> files are needed in either case.

Grouping them by revision has a few consequences.

 * When fetching from or writing to a remote server, we need to transfer
   one file per revision, whose size is roughly proportional to the 
   amount of changes in that revision.  This is nice.

 * These files can be not just append-only, but strictly write-once.
   Personally I'd feel more confident that they're less likely to 
   be damaged by bugs, hardware or os failure, or undetected malicious
   access.

 * Walking along the history of a single file will have to open all the 
   revisions that touched that file.  We can make the history deltas
   have an index so that retrieving the section relevant to a single
   file doesn't require unpacking the whole delta (as in arch and baz 
   1.x).  We can also, as at present, have each version of a file have
   a pointer back to the previous revision that modified it, so 
   we can skip back through the chain.

 * One can easily group many of these deltas into a common storage pool.
   Revisions that aren't relevant to a particular branch just won't be 
   read, and don't cause any scaling or consistency problems.

 * Ghosts are perhaps also more tractable; when we find a new ghost
   revision we just bring it in (and perhaps clear caches or something 
   similar.)

I think it's a pretty promising approach.  I should add that this is
also similar in some ways (but not others) to the Arch 2.0 design and to
some ideas Robert and I had kicked around for the baz 1.x codebase.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051207/095da659/attachment.pgp 


More information about the bazaar mailing list