jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <...@tfd.co.uk>
Subject Re: Concurrent writes causes repository exception.
Date Tue, 24 Mar 2009 23:24:20 GMT
I think I may have fixed this problem with more aggressive explicit  
locking and putting all the observation code in transactions.
Its also possible that updates are now serial so the problem just  
doesn't happen, rather than being fixed..... alternatively you could  
say its the right way to do it.
The only problem that I have now is that the locks timeout in the  
observation code before they have a chance to get granted, but thats  
my problem (I am using an external lock manager to avoid the journal  
records hitting the db on lock/unlock)


On 24 Mar 2009, at 21:00, Ian Boston wrote:

>    I have some code that writes about 4 nt:file nodes which are  
> observed. (each group of 4 files represents a user and their profile)
> I test this will a perl script over HTTP to rest that is capable of  
> running multithreaded.
> When I run single threaded, then there is no problem, I can create  
> 25k, although a bit slowly.
>
> However when I run with 8 threads I get the below in within the  
> first few create requests.
>
> Any idea what the problem is ?
>
> Ian
>
>
>
>
>
>     [exec] Caused by: javax.jcr.RepositoryException:  
> 09a609cb-267f-4dfc-bc95-56eff64a08b7: 09a609cb-267f-4dfc- 
> bc95-56eff64a08b7
>     [exec] 	at  
> org 
> .apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java: 
> 505)
>     [exec] 	at  
> org 
> .apache 
> .jackrabbit 
> .core 
> .version 
> .AbstractVersionManager 
> .createVersionHistory(AbstractVersionManager.java:321)
>     [exec] 	at  
> org 
> .apache 
> .jackrabbit 
> .core 
> .version.XAVersionManager.createVersionHistory(XAVersionManager.java: 
> 138)
>     [exec] 	at  
> org 
> .apache.jackrabbit.core.ItemImpl.initVersionHistories(ItemImpl.java: 
> 782)
>     [exec] 	at  
> org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1224)
>     [exec] 	at  
> org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:897)
>     [exec] 	at  
> org 
> .sakaiproject 
> .kernel 
> .jcr 
> .jackrabbit.sakai.SakaiXASessionImpl.save(SakaiXASessionImpl.java:220)
>     [exec] 	at  
> org 
> .sakaiproject 
> .kernel.jcr.jackrabbit.JCRServiceImpl.save(JCRServiceImpl.java:114)
>     [exec] 	at  
> org 
> .sakaiproject 
> .kernel.rest.RestUserProvider.createUser(RestUserProvider.java:378)
>     [exec] 	at  
> org 
> .sakaiproject 
> .kernel.rest.RestUserProvider.dispatch(RestUserProvider.java:134)
>     [exec] 	... 22 more
>     [exec] Caused by:  
> org.apache.jackrabbit.core.state.NoSuchItemStateException:  
> 09a609cb-267f-4dfc-bc95-56eff64a08b7
>     [exec] 	at  
> org 
> .apache 
> .jackrabbit 
> .core 
> .state 
> .SharedItemStateManager.getItemState(SharedItemStateManager.java:260)
>     [exec] 	at  
> org 
> .apache 
> .jackrabbit 
> .core 
> .state.LocalItemStateManager.getNodeState(LocalItemStateManager.java: 
> 93)
>     [exec] 	at  
> org 
> .apache 
> .jackrabbit 
> .core 
> .state.LocalItemStateManager.getItemState(LocalItemStateManager.java: 
> 158)
>     [exec] 	at  
> org 
> .apache 
> .jackrabbit 
> .core.state.XAItemStateManager.getItemState(XAItemStateManager.java: 
> 243)
>     [exec] 	at  
> org 
> .apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java: 
> 533)
>     [exec] 	at  
> org 
> .apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java: 
> 503)
>


Mime
View raw message