Timeout error trying to lock table in h2

前端 未结 8 1597
无人共我
无人共我 2020-12-02 16:39

I get the following error under a certain scenario

When a different thread is populating a lot of users via the bulk upload operation and I was trying to view the li

8条回答
  •  情书的邮戳
    2020-12-02 17:26

    Working with DBUnit, H2 and Hibernate - same error, MVCC=true helped, but I would still get the error for any tests following deletion of data. What fixed these cases was wrapping the actual deletion code inside a transaction:

    Transaction tx = session.beginTransaction();
    ...delete stuff
    tx.commit(); 
    

提交回复
热议问题