Skip to content

Cancelled queries stay in a 'stopping' status until the JDBC connection is closed #5

@monetdb-team

Description

@monetdb-team

Date: 2017-02-21 13:53:50 +0100
From: Manuel <>
To: clients devs <>
Version: 11.25.5 (Dec2016-SP1)

Blocker for: MonetDB/MonetDB#6222
Last updated: 2017-03-02 18:35:15 +0100

Comment 25045

Date: 2017-02-21 13:53:50 +0100
From: Manuel <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Build Identifier:

I am using Monetdb in a java application via the JDBC driver. I need to cancel long running queries, or queries that are no longer relevant. Since monetdb JDBC driver does not support jdbc statement cancelling, I have implemented my query cancelling mechanism following what described here: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/monitor

First, I retrieve the qtag of the query to cancel, and then execute the command call sys.stop().

I have monitored the queue of active queries via the queries

select * from sys.queue()

I see many cancelled queries are in a stopping status, and they stay there for a really long time (much more than it takes for the query to complete), and possibly forever, preventing genuine queries to be executed it seems. Closing the JDBC connection clear these queries in this stopping state: I am aware that when you cancel a query, you cannot interrupt the current MAL operation which is executed, but I don't understand what this stopping state means, and why cancelled queries stay there for such a long time. Am I doing something wrong ? Why closing the jdbc connection remove all these queries in a stopping status ? How can I effectively cancel queries without compromising the monetdb server.

Reproducible: Always

Actual Results:

Cancelled queries are stuck in a stopping state, preventing genuine queries to be executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions