Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to resolve deadlocks besides using retry?

783445Jul 7 2010 — edited Jul 8 2010
We have a case to load 100 documents to the BDBXml containers, and we plan to use multi-threads.
Two tests were issued:
1) The 100 documents will be loaded to one container.
5 threads were spawned. While in one thread, the document was being loaded, in the other threads, the loading operations were blocked(DB_LOCK_DEADLOCK exception was thrown). So we introduce the retry strategy. Basically we did 20 times retry every 0.25 seconds.
Unfortunately, even we used up all the retries, there were still many loading operation failed.

2)The 100 document will be loaded to 100 containers.
5 threads were spawned. We didn't meet the deadlock issue. All the loading operation succeeded.


We prefer to using one container for all the 100 documents, but we could not resolve the deadlock issue even we use the retry.
Is there any other way to resolve this issue?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2010
Added on Jul 7 2010
5 comments
2,114 views