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
Race condition or resource contention on CI runners causes one remote shard's read to exceed the 60s timeout. The shard service test creates multiple mock CN nodes and relies on inter-node communication completing within the timeout.
Suggested Fix
Increase the timeout for CI environments
Or add retry logic for transient shard read failures
Or use synchronization barriers to ensure all shards are ready before the read
This reproduced the same assertion and exited non-zero after 149.607s.
The evidence does not support a remote read timing out: the test verifies client.asyncCalls == 0, and the failure occurs before any remote request is sent.
Observed timing explains the ~60s duration. In the slow setup path, all three replicas are initially allocated to cn1; one shard moves to cn2, then the balance freeze delays the second move to cn3 by about 60 seconds. After setup, the test chooses an incompatible remote CN from asynchronously maintained shard/cache state. Read interleaves Adjust and compatibility validation and returns as soon as the incompatible shard is encountered, so depending on the selected ordering only one shard reaches Adjust, producing map[1:1].
This is reproducible independently of PR #25843's resource-accounting changes; that PR does not modify pkg/shardservice. Suggested fix: make the test topology and incompatible shard deterministic, avoid relying on asynchronous rebalance/cache ordering, and assert the actual contract that no AsyncSend occurs before compatibility validation succeeds.
Activity
aptend commentedon Jul 22, 2026
Additional reproduction and corrected diagnosis from PR #25843 UT failure:
CI occurrence: https://github.com/matrixorigin/matrixone/actions/runs/29935336540/job/88975630053
Failed assertion:
Local reproduction on commit
2c9fba620:.agents/skills/mo-dev/scripts/mo-cgo-test \ -run '^TestReadValidatesAllRemoteShardsBeforeSending$' \ -count=30 -timeout=300s ./pkg/shardserviceThis reproduced the same assertion and exited non-zero after 149.607s.
The evidence does not support a remote read timing out: the test verifies
client.asyncCalls == 0, and the failure occurs before any remote request is sent.Observed timing explains the ~60s duration. In the slow setup path, all three replicas are initially allocated to
cn1; one shard moves tocn2, then the balance freeze delays the second move tocn3by about 60 seconds. After setup, the test chooses an incompatible remote CN from asynchronously maintained shard/cache state.ReadinterleavesAdjustand compatibility validation and returns as soon as the incompatible shard is encountered, so depending on the selected ordering only one shard reachesAdjust, producingmap[1:1].This is reproducible independently of PR #25843's resource-accounting changes; that PR does not modify
pkg/shardservice. Suggested fix: make the test topology and incompatible shard deterministic, avoid relying on asynchronous rebalance/cache ordering, and assert the actual contract that noAsyncSendoccurs before compatibility validation succeeds.test(shardservice): make remote compatibility preflight deterministic (…
test(shardservice): make remote compatibility preflight deterministic (…
test(shardservice): make remote compatibility preflight deterministic (…
test(shardservice): make remote compatibility preflight deterministic (…