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 <[email protected]>
> написал(а):
>
> 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.