Branch Name
main
Commit ID
6886094 (base of the affected PR)
Other Environment Information
Actual Behavior
TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful intermittently receives context canceled from ParallelRun. In the failing CI artifact, cleanup logged classification=parallel_scope_build_unattributed_cancel, normalized=false, pipeline_err=<nil>, and query_err=<nil>; cleanup selected Error instead of End. The assertion failed at issue27261_repro_test.go:206.
Expected Behavior
StopSending should cancel only the remote pipeline. While the query context remains active, cancellation during parallel reader construction should be normalized as internal pipeline cancellation and should not escape as an execution error.
Steps to Reproduce
- Run
go test ./pkg/sql/compile -run '^TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful$' repeatedly under the CI test configuration.
- Observe whether reader construction returns
context canceled before the scope context used for normalization reports cancellation.
Additional information
Likely race to verify: the reader context is built from c.proc.Ctx, while ParallelRun classifies the error against s.Proc.Ctx. StopSending cancels the parent pipeline context; the reader can wake and return before cancellation has propagated to the child scope context. This matches the CI log but needs a deterministic regression test and fix. The PR #28799 diff changes only mpool files, so this is tracked as a base issue, not attributed to that PR.
A local run of the targeted test passed 5 iterations; the CI failure log is consistent with a propagation race rather than a deterministic assertion failure.
Branch Name
main
Commit ID
6886094 (base of the affected PR)
Other Environment Information
Actual Behavior
TestIssue27261StopSendingDuringParallelReaderBuildStaysGracefulintermittently receivescontext canceledfromParallelRun. In the failing CI artifact, cleanup loggedclassification=parallel_scope_build_unattributed_cancel,normalized=false,pipeline_err=<nil>, andquery_err=<nil>; cleanup selected Error instead of End. The assertion failed atissue27261_repro_test.go:206.Expected Behavior
StopSending should cancel only the remote pipeline. While the query context remains active, cancellation during parallel reader construction should be normalized as internal pipeline cancellation and should not escape as an execution error.
Steps to Reproduce
go test ./pkg/sql/compile -run '^TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful$'repeatedly under the CI test configuration.context canceledbefore the scope context used for normalization reports cancellation.Additional information
Likely race to verify: the reader context is built from
c.proc.Ctx, whileParallelRunclassifies the error againsts.Proc.Ctx. StopSending cancels the parent pipeline context; the reader can wake and return before cancellation has propagated to the child scope context. This matches the CI log but needs a deterministic regression test and fix. The PR #28799 diff changes only mpool files, so this is tracked as a base issue, not attributed to that PR.A local run of the targeted test passed 5 iterations; the CI failure log is consistent with a propagation race rather than a deterministic assertion failure.