ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolay Izhikov <nizhi...@apache.org>
Subject Re: [DISCUSSION][IEP-39] Management API to cancel user provided tasks and queries.
Date Thu, 06 Feb 2020 12:29:27 GMT
Ticket [1] created.

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

> 5 февр. 2020 г., в 15:36, Nikolay Izhikov <nizhikov.dev@gmail.com> написал(а):
> 
> Alexey.
> 
> I’m talking the following scenario:
> 
> 1. Consider we have unified bean to kill tasks: 
> 
> CancelMXBean {
> 	public void cancel(long id);
> }
> 
> 2. And we have the following log:
> 
> ```
> Transaction with ID=42 started.
> Compute task with ID=43 started.
> ```
> 
> 3. We want to kill compute task and by mistake executing:
> 
> cancelMxBean.cancel(42); //This will kill transaction not compute task.
> 
> The user doesn’t have a chance to know, what type of object he is killing.
> I think we should prevent this type of error by the API design.
> 
> 
>> 5 февр. 2020 г., в 14:43, Alexey Goncharuk <alexey.goncharuk@gmail.com>
написал(а):
>> 
>> Nikolay,
>> 
>> 
>>>               Consider copy-pasting wrong id from log to its
>>> parameters(killing not the buggy compute task, but *VERY* important
>>> transaction.
>>>               How users even know about this type of error with the
>>> single method approach?
>>> 
>>> I thought that the identifiers would never intersect (meaning that a
>> transaction and a task would never share the same ID)
>> 
>> I agree that change ID types for all objects would be a hard task, so
>> probably it's worth discussing a single cancel entry on phase 3.
> 


Mime
View raw message