You can call cancel() on a Statement, but the way that H2 implements
cancel() means that only some stages of query processing can be
interrupted. So how effective it is, depends on where the query is getting
stuck.
--
You received this message because you are subscribed to the Google Groups "H2
I have no issue if it takes couple of seconds longer. I'm using
Hibernate... Need to research if jdbc cancel statesment is exposed...
On Thu, Jul 4, 2019, 11:47 AM Noel Grandin wrote:
> You can call cancel() on a Statement, but the way that H2 implements
> cancel() means that only some stages
Thread.interrupt() is a way to database corruption.
Take a look on the SHUTDOWN command:
https://h2database.com/html/commands.html#shutdown
You can execute this command and wait for its completion. After its
execution you can interrupt your threads as you wish.
Of course, you need to prevent
I read about SHUTDOWN and it is good if I want to tear the whole thing
down. But what if I want to interrupt a single transaction?
On Thu, Jul 4, 2019 at 9:30 AM Evgenij Ryazanov wrote:
> Thread.interrupt() is a way to database corruption.
>
> Take a look on the SHUTDOWN command:
>
Is there a way to safely interrupt a running thread, that may be in middle
of a transaction commit? I read that it is not recommended to use
Thread.interrupt() with h2, but I have a need to shutdown many threads and
cannot tell which thread may be in middle of a transaction. The main