You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Thomas Müller <th...@day.com> on 2009/12/09 09:37:34 UTC

Re: Invalid item state while adding nodes on different sessions on multi thread environment

Hi,

> This problem will come in concurrent request to repository to either add
> content or read content.

That's not fully correct. Multiple session can read from the
repository concurrently. Also, multiple session can write to the
repository concurrently, given that they write in different nodes.

The test case tries to concurrently modify the node '/root'. I know it
doesn't look like it would. But internally, Jackrabbit stores the list
of child nodes at the node itself, that means if you add a node to
'/root' then you implicitly update the node '/root'. And that's where
the conflict occurs.

The exception message is quite strange, it sounds like the problem
occurs on the node '/' (on the root node). I'm not sure why it doesn't
say '/root'.

Regards,
Thomas

Re: Invalid item state while adding nodes on different sessions on multi thread environment

Posted by Patricio Echagüe <pa...@gmail.com>.
Hi guys, I'm running into the same problem. Has there been any update on
this?

I looked at Jira and there is no comments on this "bug" yet.

Regards,
Patricio

On Wed, Dec 9, 2009 at 1:30 AM, Luiz Fernando Teston <
feu.teston@caravelatech.com> wrote:

> Thomas,
>
> I created the JIRA issue JCR-2428 </jira/browse/JCR-2428> . I'm really
> thankful for your help! Since my application uses multi threaded
> environment, this fix would help us a lot!
>
> Best regards,
>
>
>
> Fernando Teston
>
> On Wed, Dec 9, 2009 at 7:13 AM, Thomas Müller <thomas.mueller@day.com
> >wrote:
>
> > Hi,
> >
> > Actually, it turns out, concurrently adding nodes to the same parent
> > node should work, when using different node names (so only same name
> > siblings are problematic). Your test case should work as far as I see.
> > I will try to find out what the problem is... Could you create a new
> > Jira issue and attach your test case please?
> >
> > Regards,
> > Thomas
> >
>

Re: Invalid item state while adding nodes on different sessions on multi thread environment

Posted by Luiz Fernando Teston <fe...@caravelatech.com>.
Thomas,

I created the JIRA issue JCR-2428 </jira/browse/JCR-2428> . I'm really
thankful for your help! Since my application uses multi threaded
environment, this fix would help us a lot!

Best regards,



Fernando Teston

On Wed, Dec 9, 2009 at 7:13 AM, Thomas Müller <th...@day.com>wrote:

> Hi,
>
> Actually, it turns out, concurrently adding nodes to the same parent
> node should work, when using different node names (so only same name
> siblings are problematic). Your test case should work as far as I see.
> I will try to find out what the problem is... Could you create a new
> Jira issue and attach your test case please?
>
> Regards,
> Thomas
>

Re: Invalid item state while adding nodes on different sessions on multi thread environment

Posted by Thomas Müller <th...@day.com>.
Hi,

Actually, it turns out, concurrently adding nodes to the same parent
node should work, when using different node names (so only same name
siblings are problematic). Your test case should work as far as I see.
I will try to find out what the problem is... Could you create a new
Jira issue and attach your test case please?

Regards,
Thomas

Re: Invalid item state while adding nodes on different sessions on multi thread environment

Posted by Luiz Fernando Teston <fe...@caravelatech.com>.
Hi,

The e-mails and also the wiki are clear. I also did a test writing on
different threads and different nodes and it works. If you guys are planning
to change this behavior please let me know, maybe sending me the jira issue
(so I could follow it).

Regards,


Fernando Teston


On Wed, Dec 9, 2009 at 6:51 AM, Thomas Müller <th...@day.com>wrote:

> Hi,
>
> I updated the wiki:
> http://wiki.apache.org/jackrabbit/QuestionsAndAnswers#Concurrency
>
> Please tell me if you have more question or if it's unclear.
>
> Regards,
> Thomas
>

Re: Invalid item state while adding nodes on different sessions on multi thread environment

Posted by Thomas Müller <th...@day.com>.
Hi,

I updated the wiki:
http://wiki.apache.org/jackrabbit/QuestionsAndAnswers#Concurrency

Please tell me if you have more question or if it's unclear.

Regards,
Thomas