Repository navigation
fix(compile): normalize remote notify cancellation - #27537
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review completed on exact head 306ccdbb176cd3597de8e9088c2fdb3d43c9adc9. No blocking issue found.
The notify cleanup path now consumes normalizeScopeRunError consistently instead of restoring a raw context.Canceled after the normalizer has proven it to be secondary pipeline fallout. The fatal boundaries remain intact: a substantive pipeline cancel cause is recovered; query-context cancellation/deadline remains visible; cancellation while the pipeline is still active is not suppressed; mixed/substantive error trees never classify as cancellation-only. The corrected retry test now cancels the actual query context, so it no longer encodes the old bug as expected behavior.
The change adds no new goroutine, channel, timer, allocation, or retry edge. Q1-Q3 remain closed: every notify task still emits one bounded cleanup terminal/result and calls wg.Done; sibling cancellation occurs only for a non-nil normalized error; and the retry wait remains query-context bounded. Fresh full compile tests, focused race tests for 50 repetitions, build, vet, and diff checks pass.
Merge Queue Status
This pull request spent 22 seconds in the queue, including 3 seconds running CI. Required conditions to merge
|
A downstream early stop can cancel a remote-notify pipeline while the query context remains active. The shared cancellation normalizer correctly classifies the resulting raw context.Canceled as secondary pipeline fallout, but the notify path restored that raw error and failed the whole query. This change makes remote-notify cleanup use the normalized result consistently. Substantive pipeline causes, query-level cancellation, and independent cancellation while the pipeline is active remain visible; only cancellation caused by normal pipeline teardown is suppressed. It also corrects the retry-cancellation test so it cancels the query context it claims to cover, and adds controls for pipeline cancellation, query cancellation, active-pipeline cancellation, and substantive causes. Validation: - focused cancellation regressions, count=100 - focused race tests, count=100 per test - full pkg/sql/compile unit-test package - full pkg/sql/compile race suite - go build and go vet for pkg/sql/compile Approved by: @XuPeng-SH
A downstream early stop can cancel a remote-notify pipeline while the query context remains active. The shared cancellation normalizer correctly classifies the resulting raw context.Canceled as secondary pipeline fallout, but the notify path restored that raw error and failed the whole query. This change makes remote-notify cleanup use the normalized result consistently. Substantive pipeline causes, query-level cancellation, and independent cancellation while the pipeline is active remain visible; only cancellation caused by normal pipeline teardown is suppressed. It also corrects the retry-cancellation test so it cancels the query context it claims to cover, and adds controls for pipeline cancellation, query cancellation, active-pipeline cancellation, and substantive causes. Validation: - focused cancellation regressions, count=100 - focused race tests, count=100 per test - full pkg/sql/compile unit-test package - full pkg/sql/compile race suite - go build and go vet for pkg/sql/compile Approved by: @XuPeng-SH
A downstream early stop can cancel a remote-notify pipeline while the query context remains active. The shared cancellation normalizer correctly classifies the resulting raw context.Canceled as secondary pipeline fallout, but the notify path restored that raw error and failed the whole query. This change makes remote-notify cleanup use the normalized result consistently. Substantive pipeline causes, query-level cancellation, and independent cancellation while the pipeline is active remain visible; only cancellation caused by normal pipeline teardown is suppressed. It also corrects the retry-cancellation test so it cancels the query context it claims to cover, and adds controls for pipeline cancellation, query cancellation, active-pipeline cancellation, and substantive causes. Validation: - focused cancellation regressions, count=100 - focused race tests, count=100 per test - full pkg/sql/compile unit-test package - full pkg/sql/compile race suite - go build and go vet for pkg/sql/compile Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #27261
What this PR does / why we need it:
A downstream early stop can cancel a remote-notify pipeline while the query context remains active. The shared cancellation normalizer correctly classifies the resulting raw context.Canceled as secondary pipeline fallout, but the notify path restored that raw error and failed the whole query.
This change makes remote-notify cleanup use the normalized result consistently. Substantive pipeline causes, query-level cancellation, and independent cancellation while the pipeline is active remain visible; only cancellation caused by normal pipeline teardown is suppressed.
It also corrects the retry-cancellation test so it cancels the query context it claims to cover, and adds controls for pipeline cancellation, query cancellation, active-pipeline cancellation, and substantive causes.
Validation: