This content has been marked as final. Show 2 replies
The scenario that causes the deadlock is exactly the same as what occurs during concurrent DML into a relational table with a unique constraint.
Underneath, the semantic store too has a uniqueness constraint defined to prevent duplicate RDF triples in the same RDF model. So, suppose one transaction T1 inserts triple (a,b,c), a second trans T2 inserts triple (d,e,f). Then the first transaction T1 tries to insert the triples (d,e,f), but it blocks because this triple has already been inserted by the yet-to-be-committed transaction T2. Now, when the second transaction T2 tries to insert triple (a,b,c), it blocks as well because this triple has already been inserted by the yet-to-be-uncommitted transaction T1. So, this circularity brings us to a deadlock and Oracle would raise ORA-00060: deadlock detected while waiting for resource.
Since this is exactly how deadlock may occur in any relational table with unique constraints defined on it, the best practice for avoiding deadlock would be the same for concurrent inserts into the same RDF model.
Hope this helps.
This is what I assumed.
Is there any benifit from breaking the data into different Models or Named Graphs (since all of the link data is stored in the same table)?