db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-3908) Add a mechanism for cancelling runaway transactions.
Date Tue, 24 Mar 2015 20:24:53 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14378516#comment-14378516

Rick Hillegas commented on DERBY-3908:

Hi Liam,

I think that's a promising place to start. I think that you would want to put some defensive
code in EmbedStatement. At least the following:

1) Make it look up the LanguageConnectionContext in a privileged block and check that the
lcc it is not null.

2) Get the StatementContext of the currently executing statement from the lcc and check that
the statement that is running is the statement whose cancel() method was called.

3) Then call cancel() on that StatementContext.

That's what occurs to me off the top of my head. Hope this helps,

> Add a mechanism for cancelling runaway transactions.
> ----------------------------------------------------
>                 Key: DERBY-3908
>                 URL: https://issues.apache.org/jira/browse/DERBY-3908
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_10
> We should add a mechanism by which the DBA can cancel a runaway transaction. Perhaps
we could implement this as a new system procedure. This issue comes up on the user list frequently.
For instance, see this thread: http://www.nabble.com/cancel-a-running-query--td19903183.html#a19903183
On the implementation side, Knut points out that EmbedConnection.cancelRunningStatement()
might be a useful place to start.

This message was sent by Atlassian JIRA

View raw message