jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Raboch <wrab...@ingen.at>
Subject Re: concurrency problem
Date Wed, 10 Aug 2005 11:57:52 GMT
Hi Stefan,

> the correct beahviour should be:
> 
> s0 : Read the rootNode
> s1 : Read the rootNode
> s0 : Modify rootNode : remove testnode-s0
> s1 : Modify rootNode : remove testnode-s1 & save() -->ERROR the rootNode

  there should be no error at this point, s0 has not been saved yet.

> s0 : save()

  now there should be an error since s1 saved its state before

> s1 : save() -->InvalidItemStateException since the root node has been externally
>       modifiied (by s0) is has s1's 'copy' has become stale as a result

  I dont think that here should be an error, since the last saved 
(commited) version  of the rootNode is from s1 and the changes from s0 
has not been valid and not commited. so the nodes state has not changed.

> we'll fix that asap.

Thanks for the discussion. Now I unterstand jackrabbits way of doing. 
But in my opinion adding child nodes should not alter the parent node 
itself. Just changing some properties is a state change.

Furthermore there should be an error just in the case, that both updates 
overwrite the changes of the other -> to prevent lost update problems.
In my example code it´s not the case, so I would prefer no error at all.
What do you think?

cheers,
Walter

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message