RFC: split-inventories design: children-of-node/path-traversal
Robert Collins
robertc at robertcollins.net
Thu Oct 30 20:40:37 GMT 2008
On Thu, 2008-10-30 at 09:00 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
>
> ...
>
> >> So while I think "parentid,child_basename" is interesting, I think a
> >> fullpath index is much more what we want. Possibly a dirblock sorted
> >> fullpath index, but fullpath nonetheless.
> >
> > I think both are worth bring up far enough to compare size and baseline
> > performance.
> >
> > a fileid,child_basename index is more general (because we can seek into
> > it without resolving file id to full path). So children(fileid) with a
> > fullpath index is done by walking the file ids to the root to get the
> > full path, and then back into the fullpath index. Thats height(tree)
> > overhead, compared to a direct lookup.
> >
> > -Rob
>
>
> True, but why not do children(fullpath) instead? We certainly could tell
> inventory entries what there path is in the current tree.
If we do that then a reparent operation needs to rewrite all the child
entries recursively, or we have to determine the full path some other
way when we start with just a file id. This implies more changes to our
internals over and above the new storage.
> It is possible to have a problem if the parent dir moves, the child
> needs to be updated, and if you are sharing objects between Inventories
> then you could run into more problems.
Not just the child, the entire subtree.
> I think it is still manageable rather than going through 'fileid' for
> everything, but I certainly think you can try both if you want.
Thank you :)
-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/20081031/e1dafbdf/attachment.pgp
More information about the bazaar
mailing list