jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Müller <thomas.muel...@day.com>
Subject Re: InvalidItemStateException with concurrent threads
Date Fri, 20 Mar 2009 11:27:04 GMT
Hi,

> that doesn't mean that pink elephants will start mystically appearing
> from thin air.

In software development, sometimes they do :-)

> it's fairly
> straightforward to calculate a strategy for distributing the nodes in
> a way that the likelihood of a conflict is less than 1% during the
> entire lifetime of your system.

The formula is quite complicated (see
http://en.wikipedia.org/wiki/Birthday_paradox), and even if done
right, requirements change sometimes.

> need to figure out
> what to do with conflicts.

Sure. I suggest I will write a utility method

// get the node if it exists, create it if not (with retry)
getOrCreateNode(Node parent, String name)

... and maybe another one with synchronization, if it turns out this
is faster on average (which needs to be tested).
The only question is where that should go:
jackrabbit/trunk/jackrabbit-jcr-commons or jackrabbit/commons, and if
in /commons, how do we call this project?

> a) forcibly merge conflicting changes

In that case this is not possible, because the two nodes have the same
name but different UUIDs.

Regards,
Thomas

Mime
View raw message