Description
As of now during cancellation process reduce's node send cancellation requests to map nodes and don't wait answer from them. See usage of org.apache.ignite.internal.processors.query.GridQueryCancel#set, where set action on cancellation. There are two main usage in GridReduceQueryExecutor, and action is send GridQueryCancelRequest with request id to set of nodes.
Need to await answer from all of map nodes.
Proposed solution is:
All nodes consuming GridQueryCancelRequest should await real cancellation of map parts of original query and send back new message with cancellation confirmation.
Reduce node (which send GridQueryCancelRequest to all map nodes) await answers from all of that nodes. Need to remember that any nodes can be terminated and we need remember about it and take into account during awaiting.