On 08/21/2010 11:24 PM, Paul Libbrecht wrote:
> I recently turned log4j's root category of my xwiki to info and I get
> floods of the following exceptions:
>
> 2010-08-21 22:21:00,381 INFO  def.DefaultLoadEventListener  - Error
> performing load command
> org.hibernate.ObjectNotFoundException: No row with the given
> identifier exists: [com.xpn.xwiki.doc.XWikiDocument#2524421]
>           at org.hibernate.impl.SessionFactoryImpl
> $1.handleEntityNotFound(SessionFactoryImpl.java:377)
>           at
> org
> .hibernate
> .event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:
> 145)
>           at
> org
> .hibernate
> .event
> .def
> .DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
>           at
> org
> .hibernate
> .event
> .def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
>           at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:
> 878)
>           at org.hibernate.impl.SessionImpl.load(SessionImpl.java:784)
>           at
> com
> .xpn
> .xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:
> 611)
>
>
> this sounds dark and probably a performance eater (exceptions always
> are even if not stacktraced). Can anyone suggest me a method to
> identify how to avoid such errors or what they uncover?
>
> thanks in advance

I guess this is the normal result when trying to load non-existing 
documents. And XWiki tries to load a lot of such documents, when 
checking rights or preferences.

First performance improvement possible would be to optimize the 
loadXWikiDocument method to first check if the doc exists, with a 
"select doc.id from XWikiDocument doc where doc.id like ?", 
targetDoc.getId(), and checking if there's at least one result.

A second performance improvement would be to add more caches everywhere, 
rights cache, preferences cache, document title cache...

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to