Hi Robert,

> The main inconvenient is that many times commmits which affect /foo and
> /bar are have the commit root at '/',

commit roots are required only at multi doc commit time (to track 2
phase commit logic's 'lock' document). So, node state for following 2
repo states is equiavelent (for a committed revision R1):
1. "/node1"->_commitRoot.R1="0" AND "/"->_revision.R1="c"
2. "/node1"->_revision.R1="c"

Since, you'd be working at persistence level, you can always map
_commitRoot.RX=N to _revision.RX="c" where RX is validated to be
already committed.

Although, this rewrite won't change document node state but it indeed
changes document state... but that should be OK for your case and
document cache is an in-memory cache while node state cache is backed
by pers. cache.

> so the collections extracted
> using something like oak-run.js' printMongoExportCommand will not work.

'printMongoExportCommand' currently is really dumb... in the sense
that it doesn't care about revisions etc. For a given path, it simply
gets it path elements and prints a mongo export command for each of
those paths (ie input path and its ancestors) as well as their split
doc counterparts. Since output of such exports are usually used by us
for debug purposes (and hence we'd have the idea if multiplexing doc
store is in play or not), we might simply document the expected
behavior and not care much about exactness of export. Otoh, we might
want to add some intelligence about multiplexing... but, I think that
should be towards lower priority.

> 1) Manually create a new commit for each sub-path ( e.g. 1 for /foo and
> 1 for /bar ) and re-write the commit references for each node document
> so that they point to the new commits

So, I'd like approach 1 except that we don't create new commits.. just
sew the current state to break commit root dependency

> Approach 1) is probably going to get me in trouble with the
> DocumentNodeStore caches, so the Oak instance might not be usable after
> I perform these changes ( which can be fine, since I'm going to spin it
> up just for that ).

See above (part 1 for cache)

Thanks,
Vikas

Reply via email to