Flaky tests: plan replayer binding check & staleness txn timestamp
Open
severity/moderate
sig/planner
type/bug
type/bugfix
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
CI intermittently fails on:
- pkg/server/handler/optimizor: TestPlanReplayerWithMultiForeignKey
- tests/realtikvtest/txntest: TestValidateReadOnlyInStalenessTransaction
Observed root causes:
- PLAN REPLAYER LOAD can change the session default DB (e.g. ends at planReplayer2), so subsequent unqualified `SELECT ... FROM t` may run against the wrong DB and not match the intended binding digest.
- Staleness txn started with NOW() can be too new; using a slightly older timestamp makes the test stable.
A PR will follow to stabilize these tests and add stress-run evidence.
Contributor guide
Assessment
This issue has not been assessed yet.