jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: [jr3 microkernel] Write skew
Date Thu, 01 Dec 2011 12:05:23 GMT

On Thu, Dec 1, 2011 at 11:07 AM, Michael Dürig <mduerig@apache.org> wrote:
> Note however, that for the same reason we are currently not able to
> guarantee node type consistency:
> [...]
> Both sessions will successfully complete since for each of them the
> consistency property (nt:file cannot have a child named "foo"). holds.

The save() implementation will need to do an internal refresh(true),
check any type and other constraints, and only persist the changes if
everything is OK.

To prevent this from being a too big blocking operation, we can use
optimistic locking by making the last step of the process conditional
on the repository still being at the state it was when the
refresh(true) call was made. Otherwise the refresh-check-persist cycle
should be restarted.


Jukka Zitting

View raw message