JackieTien97 opened a new pull request, #18439: URL: https://github.com/apache/iotdb/pull/18439
## Summary - preserve fragment failure information before concurrent cancellation removes the fragment context - apply the fix to both data and schema fragment execution paths - add deterministic regression tests for the cancellation/planning-failure race ## Root cause `cancelTask` removes the `FragmentInstanceContext` before waiting for the in-progress `instanceExecution.computeIfAbsent` call. If planning then fails, the failure path returns from `computeIfAbsent` and looks the context up again. The lookup can return `null`, causing an NPE that masks the original failure, such as metadata lease fencing status 536. ## Impact The original fragment failure and status are returned instead of an unrelated NPE. ## Validation - `mvn compile -pl iotdb-core/datanode -am -DskipTests` - `mvn test -pl iotdb-core/datanode -am -Dtest=FragmentInstanceManagerTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false` (2 tests passed) -- 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]
