Repository navigation
test(hashbuild): verify broadcast budget fails closed - #26638
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? |
ck89119
left a comment
There was a problem hiding this comment.
Request changes: the current tests pass, but this exact head still does not close two Phase 0 acceptance paths claimed by the PR.
[P1] pkg/tests/issues/issue_25782_broadcast_budget_test.go:108-109 uses a plain table LEFT JOIN, not the #25782-like grouped-subquery/LEFT JOIN topology explicitly required by Phase 0 in #26563. The aggregate child is material to the original planner/executor shape, so this passing query cannot establish that the incident topology fails closed. Please retain the grouped-subquery shape while proving the failure is the HashBuild hard-budget rejection, with no result set/spill and a healthy CN afterward.
[P1] pkg/sql/colexec/hashbuild/build_test.go:234-246 does not exercise a shared broadcast execution: newTestCase fixes JoinMapRefCnt at 1, these four raw message readers start only after vm.Exec has already published the failure, and the SQL test separately forces max_dop = 1. This proves terminal-result replay, but not that a refcount>1 broadcast pipeline unblocks every real JoinMap consumer without partial probe output and then returns all accounting to zero. Please add an actual shared/parallel consumer topology and assert the same error, no-output, no-spill, and cleanup contract.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Verdict: APPROVE — no blocking findings on exact head 72ac958. GitHub cannot record an APPROVED review because the authenticated account XuPeng-SH is the pull-request author. The previous grouped-subquery and real shared-consumer gaps are closed, and the partial-result oracle now rejects any non-nil Rows independently of cleanup errors. Verified the SQL witness retains Aggregate, broadcast/no-shuffle topology and DOP 2; the admitted control returns the exact payload, while the rejected case returns terminal MySQL OOM before a result set, does not spill, and leaves the CN healthy. The refcount=2 HashBuild/HashJoin path delivers the same error to both real consumers before probe input and returns memory/disk/FD accounting to zero. Focused packages pass, the real-consumer race regression passes 100 iterations, and the latest FK session-local visibility adjustment preserves the intended post-commit oracle.
|
Fixed the SCA failure in 5e9d730. |
…ue-25782-broadcast-budget-validation # Conflicts: # pkg/sql/colexec/hashbuild/build_test.go
Summary
Validates the Phase 0 broadcast HashBuild safety contract from #26563.
LEFT JOIN(max_dop = 2) under a 1 MiB hard HashBuild budget;JoinMapRefCnt = 2and two real HashJoin consumers on child processes, proving both receive the same terminal error before probe input and emit no partial output;Invariant
A resident-only broadcast/shared JoinMap never becomes a spill topology. If its build cannot be admitted under the hard budget, it publishes one controlled terminal error to every consumer before probe input and releases all owned accounting.
Validation
TestIssue25782BroadcastHashBuildFailsClosedUnderHardBudget;TestBroadcastBudgetFailurePublishesTerminalAndCleansBudget;TestBroadcastBudgetFailureUnblocksParallelHashJoinConsumers;pkg/sql/colexec/hashbuild,pkg/sql/colexec/hashjoin, andpkg/tests/issues;pkg/sql/colexec/hashjoinpackage;go list,go build,go vet, andgolangci-lint(0 issues).Non-goals
No production spill protocol, planner policy, threshold-unit behavior, storage format, or hot path is changed.
Refs #25782
Part of #26563