ID | IEP-39 |
Author | |
Sponsor | Nikolay Izhikov|
Created | 04.02.2020 |
Status | IMPLEMENTED |
Ignite provides many API to deploy and execute user-provided code on the server nodes inside the same JVM as the Ignite process runs.
Ignite has many APIs that allocate many resources on the server nodes, also.
In case of some buggy code that consumes many system resources(CPU, RAM, flood network) or heavy query the whole cluster can become unstable.
We should provide to the cluster administrator the ability to stop any user deployed task.
JMX beans to cancel listed tasks should be introduced:
In the scope of IEP-35 System view API introduced.
A new API should use the same identifier that is used in corresponding System View.
interface QueryMXBean { boolean cancelSQL(Long queryId); //Already implemented in IGNITE-4436. boolean cancelScan(Long queryId); boolean cancelText(Long queryId); } interface ComputeMXBean { boolean cancel(IgniteUuid id); } interface ServiceMXBean { boolean cancel(IgniteUuid id); } interface TransactionMXBean { boolean cancel(IgniteUuid xid); } interface ContinuousQueryMXBean { boolean cancel(UUID id); }
control.sh
./control.sh --kill scan b2d221ca-ab08-4544-b8dc-8475538ed42f default 63 ./control.sh --kill compute 58b48c3e071-b2d221ca-ab08-4544-b8dc-8475538ed42f ./control.sh --kill tx 30058c3e071-00000000-0bac-6d33-0000-000000000003 ./control.sh --kill sql b2d221ca-ab08-4544-b8dc-8475538ed42f_7 ./control.sh --kill service my-svc ./control.sh --kill continuous bfca668d-5df8-4879-b97f-bd1712ad01c9
SQL
KILL SCAN_QUERY 'b2d221ca-ab08-4544-b8dc-8475538ed42f' 'default' 63 KILL TX '30058c3e071-00000000-0bac-6d33-0000-000000000003' KILL CONTINUOUS_QUERY 'bfca668d-5df8-4879-b97f-bd1712ad01c9' KILL COMPUTE_TASK '58b48c3e071-b2d221ca-ab08-4544-b8dc-8475538ed42f' KILL SERVICE 'my-svc'
We can identify any specific heavy process with the unique identifier.
// Links to discussions on the devlist, if applicable.