Reputation: 1600
I'm using HSQLDB with single DB and 4 tables. I'm using commons apache pooled data source.
The scenario is as follows:
Tables 1-3 are update in one transaction, thus on the same connection (different sql statents). They use auto commit false and call executeUpdate() and executeBatch(). At the end of this transaction sometimes (not each time) the "checkpoint" is called.
Table 4 is updated Simultaneous with the others but using another connection. Updates batch and then always calls "checkpoint". In this checkpoint everything hangs, the call never returns and no access to any table in this DB can be made. In the log file i see that the "checkpoint" for this 4th tables never arrives.
Can it be that I cannot perform checkpoint while there is an open connection that is using auto commit = false?
Could be a deadlock?
I have no idea what is the problem... Without this table #4 all works fine.
Upvotes: 0
Views: 240
Reputation: 24352
You can perform a CHECKPOINT while there are other open connections. The connection that performs the CHECKPOINT waits for all other connections to commit before locking the database and performing the checkpoint.
Therefore you must complete all the operations and commit before you perform a checkpoint.
Upvotes: 1