You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: ParallelRun can surface StopSending cancellation during reader construction #28816
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.
Activity
fix: preserve source context for parallel readers (#28926)
fix: preserve source context for parallel readers (matrixorigin#28926)
fix: preserve source context for parallel readers (matrixorigin#28926)