Re: insert, select --> deadlock (2 threads, 1 table)

2010-07-04 Thread Mo Maison
Le 26/06/2010 22:25, Bryan Pendleton a écrit : Now, I have remarked that creating an index on column 'SOMEDATA' is sufficient to remove the deadlock. I think an alternate approach would be to commit the insert, then perform the select in a separate transaction. This is not an option of course

Re: insert, select --> deadlock (2 threads, 1 table)

2010-06-26 Thread Bryan Pendleton
Now, I have remarked that creating an index on column 'SOMEDATA' is sufficient to remove the deadlock. I think an alternate approach would be to commit the insert, then perform the select in a separate transaction. And yet a third way, I believe, would be to set your transaction isolation to a

insert, select --> deadlock (2 threads, 1 table)

2010-06-26 Thread Mo Maison
Hello, As we have encountered deadlocks in our JEE application, I have investigated the problem. It appears it is very simple, one table and two threads (one connection per thread) is enough to reproduce it deterministically. CREATE TABLE TESTDATA ( ID INT NOT NULL GENERATED ALWAYS AS IDENTIT