You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Tolga HOŞGÖR <fa...@gmail.com> on 2017/05/18 13:05:40 UTC

C++; Cancelling Long Query

Hello,

What is the normal way to abort a statistical analysis SQL query that takes
a long time while quitting the application while using ignite C++ client?

- Destructing the cache seems to be causing a fault.
- Destructing the grid looks good enough but throws some exceptions in JVM
side so it may not be the right way to do it I think.
- Sending a custom signal does not seem to interrupt the query.

Re: C++; Cancelling Long Query

Posted by Igor Sapego <is...@gridgain.com>.
Thanks Sergi, I've forgot about that. There is no explicit way to close
cursor in C++ though. Instead it will be automatically closed, once all
instances of related QueryCursor are destroyed. Maybe we should add
explicit 'close()' method.

Best Regards,
Igor

On Mon, May 22, 2017 at 2:18 PM, Sergi Vladykin <se...@gmail.com>
wrote:

> Actually in java you can close the cursor from another thread.
>
> https://ignite.apache.org/releases/latest/javadoc/org/
> apache/ignite/cache/query/QueryCursor.html#close()
>
> Sergi
>
> 2017-05-22 14:10 GMT+03:00 Igor Sapego <is...@gridgain.com>:
>
>> Well, there is no public API for this even in Java. There is internal
>> API though, that can be used for that. If you think we should add
>> public API for this, feel free to start discussion on dev list.
>>
>> Best Regards,
>> Igor
>>
>> On Fri, May 19, 2017 at 10:04 PM, tolga <fa...@gmail.com> wrote:
>>
>>> Thank you.
>>>
>>> While timeout mechanism is fine it would be great if there is a way to
>>> explicitly abort instantly if it is possible.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-ignite-users.705
>>> 18.x6.nabble.com/C-Cancelling-Long-Query-tp12997p13037.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>

Re: C++; Cancelling Long Query

Posted by Sergi Vladykin <se...@gmail.com>.
Actually in java you can close the cursor from another thread.

https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/QueryCursor.html#close()

Sergi

2017-05-22 14:10 GMT+03:00 Igor Sapego <is...@gridgain.com>:

> Well, there is no public API for this even in Java. There is internal
> API though, that can be used for that. If you think we should add
> public API for this, feel free to start discussion on dev list.
>
> Best Regards,
> Igor
>
> On Fri, May 19, 2017 at 10:04 PM, tolga <fa...@gmail.com> wrote:
>
>> Thank you.
>>
>> While timeout mechanism is fine it would be great if there is a way to
>> explicitly abort instantly if it is possible.
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/C-Cancelling-Long-Query-tp12997p13037.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Re: C++; Cancelling Long Query

Posted by Igor Sapego <is...@gridgain.com>.
Well, there is no public API for this even in Java. There is internal
API though, that can be used for that. If you think we should add
public API for this, feel free to start discussion on dev list.

Best Regards,
Igor

On Fri, May 19, 2017 at 10:04 PM, tolga <fa...@gmail.com> wrote:

> Thank you.
>
> While timeout mechanism is fine it would be great if there is a way to
> explicitly abort instantly if it is possible.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/C-Cancelling-Long-Query-tp12997p13037.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: C++; Cancelling Long Query

Posted by tolga <fa...@gmail.com>.
Thank you.

While timeout mechanism is fine it would be great if there is a way to
explicitly abort instantly if it is possible.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/C-Cancelling-Long-Query-tp12997p13037.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: C++; Cancelling Long Query

Posted by Igor Sapego <is...@gridgain.com>.
Hi Tolga,

There is currently no such mechanism in C++. In Java you can set timeout
for query.
Here is the ticket to implement this feature in C++ [1].

[1] - https://issues.apache.org/jira/browse/IGNITE-5258

Best Regards,
Igor

On Thu, May 18, 2017 at 4:05 PM, Tolga HOŞGÖR <fa...@gmail.com> wrote:

> Hello,
>
> What is the normal way to abort a statistical analysis SQL query that
> takes a long time while quitting the application while using ignite C++
> client?
>
> - Destructing the cache seems to be causing a fault.
> - Destructing the grid looks good enough but throws some exceptions in JVM
> side so it may not be the right way to do it I think.
> - Sending a custom signal does not seem to interrupt the query.
>