ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: proposed realization KILL QUERY command
Date Mon, 19 Nov 2018 16:17:01 GMT
Hi Yuriy,

I think we can use MANAGEMENT_POOL for this. It is already used for some
internal Ignite tasks, and it appears to be a good candidate to process
cancel requests.

But there are several things which are not clear enough for me at the
moment:
1) How user is going to get the list of running queries in the first place?
Do we already have any SQL commands/views to get this information?
2) We need to ensure that KILL command will be processed properly by all
kinds of SQL queries - SELECT/DML/DDL, non-transactional or transactional,
local queries and distributed queries. Will we be able to support all these
modes?

Vladimir.

On Mon, Nov 19, 2018 at 6:37 PM Юрий <jury.gerzhedowich@gmail.com> wrote:

> Hi Igniters,
>
> Earlier we agreed about syntax KILL QUERY '[node_order].[query_counter]',
> e.g. KILL QUERY '25.123' for single query  or KILL QUERY '25.*' for all
> queries on the node. Which is part of IEP-29
> <
> https://cwiki.apache.org/confluence/display/IGNITE/IEP-29%3A+SQL+management+and+monitoring
> >
> .
>
> Now I want to discuss internal realization of KILL query feature.
>
> My current vision is following:
> After parsing, Ignite create KILL query command with two parameters:
> nodeOrderId, nodeQryId. To determine that need to kill all queries on a
> node we can use negative value of query id, due to qry id always have
> positive values.
> The command process at IgniteH2Indexing as native command.
> By nodeOrderId we find node which initial for the query and send to the
> node new GridQueryKillRequest with nodeQryId to TOPIC_QUERY with not QUERY
> POOL executor.
> At GridReduceQueryExecutor we add support of processing new
> GridQueryKillRequest
> which just run already exists cancelQueries method with given qryId or with
> all qryIds which currently running at the node in case at initial KILL
> QUERY parameters used star symbol.
>
> I have a doubt which of thread pool we should use to process
> GridQueryKillRequest.
> My opinion it shouldn't be QUERY pool, due to the pool can be fully used by
> executing queries, it such case we can't cancel query immediately. May we
> use one of already existed pool or create new one? Or may be I'm mistaken
> and it should use QUERY pool.
>
> What do you think about proposed plan of implementation?
>
> And please give comments about which of thread pool will be better to use
> for kill query requests. It's small, but really important part of the
> realization.
>
>
> Thanks.
>
>
> --
> Живи с улыбкой! :D
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message