jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: oak-api and move operations
Date Tue, 03 Apr 2012 10:02:13 GMT

>String branchRevision = mk.branch(baseRevision);
>mk.merge(branchRevision, baseRevision);

This looks nice, but I'm not sure whether it would work. If merging is the
responsibility of all MicroKernel implementations, then possibly quite a
lot of business logic would have to be implemented within each MicroKernel
implementations (separately). For example indexing: if two sessions add
new nodes to branches, and then merge the changes, then the index could
get corrupt if the added nodes contain the same index values. For
versioning, similar problems might arise (depending on how versioning is
implemented). Also, some MicroKernel implementations (for example a
MongoDB MicroKernel implementation) might not be able to support branching
and merging.

I'm against implementing this feature now without careful investigation of
all possible problems and consequences.

Relational databases as an example don't support merging, even if they
support MVCC. For PostgreSQL, if you try to update the same row from
within two connections and transactions, then the second connection is
blocked until the first connection commits or rolls back the changes.
Other databases work in the same way. If merging changes would be simple,
then I'm sure relational databases would support it.


View raw message