Re: [bdbxml] problem using XmlModify in a multithreaded environment

John Snelson <[email protected]> Thu, 01 Sep 2005 10:50:28 +0100
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Hi Adrien,

You have to instruct Berkeley DB in how to check for deadlocks. Having 
done that, you will need to check for DB_LOCK_DEADLOCK exceptions, and 
abort your transaction and try again.

These pages from the BDB manual should help you to understand:

http://www.sleepycat.com/docs/ref/transapp/deadlock.html
http://www.sleepycat.com/docs/ref/transapp/put.html

John

Adrien Lamoureux wrote:
> Hello,
>  
> I'm trying to use Berkely DBXML in a multithreaded environment but every 
> time I test this case, it seems to be in deadlock. I don't get any error 
> message and it hangs indefinitely. I'm using the Java API with whole 
> document storage and a shared Environment with these flags:
>  
>     envConf.setAllowCreate(true);
>    envConf.setInitializeCache(true);
>    envConf.setInitializeLocking(true);
>    envConf.setCacheSize(1048576);
>    envConf.setMaxLockers(5000);
>    envConf.setMaxLockObjects(5000);
>    envConf.setMaxLocks(5000);
>    envConf.setMessageStream(System.out);
>    envConf.setErrorStream(System.err);
>  
> Each thread creates its own XmlManager and adopts the above environment. 
> I've tested creating and appending documents to a single container, but 
> as soon as I try to use XmlModify I get deadlock. Each thread creates 
> everthing needed to accomplish its 
> task(XmlQueryContext,XmlUpdateContext,XmlResults, etc...)
>  
> Any insight into this would be greatly appreciated.
>  
> Thank You.
>  
> Adrien


-- 
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com

Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml


------------------------------------------
To remove yourself from this list, send an
email to [email protected]