jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: race conditions in commit hooks/editors
Date Thu, 25 Apr 2013 11:27:39 GMT

On Thu, Apr 25, 2013 at 1:23 PM, Marcel Reutegger <mreutegg@adobe.com> wrote:
> I'd be interested to hear what people think about this problem.
> should we retry commits when these kind of conflicts where
> introduced by hooks or editor or do we require the latter to
> take care of this and only manipulate content in a non-conflicting
> way?

Note that the SegmentMK is designed to avoid this problem; it can
guarantee that the commit hooks get run against the latest state of
the repository and thus can't possibly conflict.

More generally though the best approach here is probably to combine
the approaches you mention. Commit hooks should generally try to avoid
creating conflicts (like what the p2 index is already doing), but if
doing so is not possible or too expensive (as it in many cases may be)
it would be best if the commit could fail and be retried after


Jukka Zitting

View raw message