[ https://issues.apache.org/jira/browse/JENA-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109539#comment-13109539 ]
Damian Steer commented on JENA-118: ----------------------------------- Unlocking occurs at the end of the transaction in postgresql. Other databases (mysql, db2, oracle) have something similar, but (surprise!) details vary. MySQL appears to need an explicit unlock. I should clarify the 'heavy' bit: it holds the lock longer than it strictly needs to (after node table modification is complete), and I think it prevents 'safe' concurrent reads, i.e. sparql queries. However it enables concurrent (ish :-) writes, so I'm inclined to enable it. Original reporter doesn't seem to have tried it. > SDB can't concurrently write (duplicate key error) > -------------------------------------------------- > > Key: JENA-118 > URL: https://issues.apache.org/jira/browse/JENA-118 > Project: Jena > Issue Type: Improvement > Components: SDB > Reporter: Damian Steer > Assignee: Damian Steer > Attachments: lock-pg.patch > > Original Estimate: 96h > Remaining Estimate: 96h > > Multiple concurrent writes in SDB can break because duplicates can appear > despite the join-based duplicate suppression. Typically the users sees > something like: > org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique > constraint "nodes_pkey" -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira