korlov42 commented on a change in pull request #8858:
URL: https://github.com/apache/ignite/pull/8858#discussion_r611488189
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -951,7 +951,7 @@ private RemoteFragmentKey(UUID nodeId, long fragmentId) {
private final Set<RemoteFragmentKey> waiting;
/** */
- private QueryState state;
+ private volatile QueryState state;
Review comment:
it's 5 lines above the line your link pointed
```
synchronized (this) {
if (state == QueryState.CLOSED)
return;
if (state == QueryState.RUNNING)
state0 = state = QueryState.CLOSING;
// 1) Cancel local fragment
ctx.cancel();
// 2) close local fragment
// 1) close local fragment
root.closeInternal();
if (state == QueryState.CLOSING && waiting.isEmpty())
state0 = state = QueryState.CLOSED;
}
```
I found only 3 places where state is changed. Two of them inside a
synchronise block. The reads are synchronised as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]