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
TestDispatchEmptyInputWaitsForRemoteReceiver in pkg/sql/colexec/dispatch/dispatch_test.go:336 fails intermittently:
dispatch_test.go:336: empty dispatch returned before its remote receiver attached
The test verifies that the dispatch operator waits for a remote receiver to attach before returning when input is empty. The dispatch returns prematurely (before receiver attachment), indicating a race condition in the wait logic.
Race condition between dispatch returning and remote receiver attachment. Under CI runner scheduling variability, the dispatch goroutine may complete before the receiver goroutine attaches.
Suggested Fix
Add synchronization (channel/WaitGroup) to ensure receiver attachment happens before dispatch checks
Or increase the wait tolerance in the dispatch wait logic
Or make the test deterministic by using explicit synchronization instead of timing
Rechecked against current main 1a14737. The originally reported post-send completion assertion is absent. The dispatch test now directly asserts the authoritative state: prepared is true and remoteReceivers contains one entry; both are possible only after Dispatch.Call receives the remote handoff.
The removed completion signal was closed after an unbuffered channel send. Its receiver could therefore return and inspect the signal before the sending goroutine was rescheduled to close it. That was a test scheduling race, not evidence that Dispatch returned before attachment.
The PR #25742 failure record was generated against a merge ref, but the reported old assertion does not exist in the current-main test source. No duplicate fix is proposed: #25820 already superseded this issue code and test path.
Activity
fix ut (#25792)
daviszhen commentedon Jul 17, 2026
fixed
LeftHandCold commentedon Jul 18, 2026
Rechecked against current main 1a14737. The originally reported post-send completion assertion is absent. The dispatch test now directly asserts the authoritative state: prepared is true and remoteReceivers contains one entry; both are possible only after Dispatch.Call receives the remote handoff.
The removed completion signal was closed after an unbuffered channel send. Its receiver could therefore return and inspect the signal before the sending goroutine was rescheduled to close it. That was a test scheduling race, not evidence that Dispatch returned before attachment.
The PR #25742 failure record was generated against a merge ref, but the reported old assertion does not exist in the current-main test source. No duplicate fix is proposed: #25820 already superseded this issue code and test path.
test(lockservice): bound remote waiter snapshot setup (#25860)
fix ut (matrixorigin#25792)
test(lockservice): bound remote waiter snapshot setup (matrixorigin#2…
fix ut (matrixorigin#25792)
test(lockservice): bound remote waiter snapshot setup (matrixorigin#2…
fix ut (matrixorigin#25792)
test(lockservice): bound remote waiter snapshot setup (matrixorigin#2…