JackieTien97 commented on code in PR #18939:
URL: https://github.com/apache/iotdb/pull/18939#discussion_r4325079212
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java:
##########
@@ -644,12 +644,17 @@ public ExecutionResult getStatus() {
} catch (InterruptedException e) {
// TODO: (xingtanzjr) use more accurate error handling
Thread.currentThread().interrupt();
+ // An interrupted waiter can still observe a failure recorded before the
interruption.
+ // Preserve its identity so callers do not mistake that failure for
shutdown cancellation.
+ TSStatus failureStatus = stateMachine.getFailureStatus();
+ if (failureStatus != null) {
+ return new ExecutionResult(context.getQueryId(), failureStatus);
Review Comment:
Verified fixed in a37eade0251adcfaa3263eba15597d69a4ac1f3b.
- Re-ran the previously failing remote-dispatch reproduction with a real
scheduled executor and the actual scheduling, dispatch, and status-handling
path; only the RPC transport was mocked. It now passes:
`failureCausedByInterruption=true`, and the reporter logs DEBUG instead of WARN.
- All three original reproduction cases still pass: pre-existing
`SYSTEM_READ_ONLY` and `WRITE_PROCESS_ERROR` failures remain WARN, while an
interruption-only failure is DEBUG.
- A clean reactor build through the DataNode module and all 45 targeted
tests passed (`AbstractDriverThreadShutdownTest`,
`IoTDBInternalLocalReporterTest`, `DriverTaskTimeoutSentinelThreadTest`, and
`QueryStateMachineTest`).
The original HA cluster shutdown scenario was not rerun. Resolving this
finding based on the verified regression coverage.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]