
On 13-05-2009 14:29:52 +0200, Bram Van Dam wrote:
Hi,
I'm implementing a bit of a consumer-producer application in Java using the JDBC driver. When I use transactions in the producer & consumer, I'll frequently get the "ERROR: COMMIT: transaction is aborted because of concurency conflicts, will ROLLBACK instead" error.
Not quite sure why this keeps happening. It's not like the same row is modified concurrently. The same *table* is (insert in one thread, vs delete in another). Could this be the cause of the problem? And more importantly, how do I get around this?
MonetDB/SQL only implements fully serialisable transaction isolation. These aborts are the result of optimistic concurrency control, and there is no way to get around it (other than serialising it) in MonetDB/SQL.