Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues; searches for
TestFailedBootstrap,bootstrapCheckDeadline, and the reported source locations found no match.
Branch Name
main
Commit ID
81a6fc70e50d4ccc28d09b0d5e87f18a97a2ad9e
Other Environment Information
- Hardware parameters: GitHub Actions Ubuntu x86 runner
- OS type: Linux/amd64
- Others: Go 1.26.4,
-race, MatrixOne ALL CI
Actual Behavior
The Ubuntu UT race suite fails pkg/logservice.TestFailedBootstrap. The test goroutine writes store.bootstrapCheckDeadline directly while the background HAKeeper ticker reads the same field in checkBootstrapWithSetterAt, producing a deterministic Go race-detector failure for that execution.
WARNING: DATA RACE
Write at ...:
github.com/matrixorigin/matrixone/pkg/logservice.testBootstrap.func1()
pkg/logservice/store_hakeeper_check_test.go:1188
Previous read at ...:
github.com/matrixorigin/matrixone/pkg/logservice.(*store).checkBootstrapWithSetterAt()
pkg/logservice/store_hakeeper_check.go:522
--- FAIL: TestFailedBootstrap (0.25s)
testing.go:1712: race detected during execution of test
Expected Behavior
TestFailedBootstrap should force the bootstrap deadline through a synchronized test seam, or stop the background checker before mutating its state, so the package passes under -race without weakening the production synchronization contract.
Steps to Reproduce
- Check out
81a6fc70e50d4ccc28d09b0d5e87f18a97a2ad9e. - Run the repository Ubuntu UT race selection containing
pkg/logservice.TestFailedBootstrap. - Observe the write/read race between
store_hakeeper_check_test.go:1188andstore_hakeeper_check.go:522.
Additional information
Commit a43181b52d2cbade56a6a70c1c84ee8abb9671aa introduced both the elapsed-time bootstrap deadline and the direct test write. The failure is unrelated to PR #28272: that PR changes no pkg/logservice file, and its exact base and head contain identical logservice sources. The nearest clean fix should centralize deadline ownership/synchronization rather than adding a sleep, retry, nolint, or race exclusion.
Activity
gouhongshen commentedon Sep 9, 2026
PR #28553 is trying to fix this issue.
gouhongshen commentedon Sep 10, 2026
Resolved by merged PR #28554 at commit
1c28541e3c136342ac97cc8b0ce011aee2690945. That change routestestBootstrapthroughrunManualHAKeeperStoreTest, which setsDisableWorkers=truebefore store construction. The production HAKeeper ticker therefore never starts for this manually driven fixture, giving the test exclusive ownership before it writesbootstrapCheckDeadline; the exact concurrent reader from the reported race is unreachable.PR #28272 has rebased onto this commit at head
a9ad4a36c9e0de6d46e0a800d3518e207cc8e69f. On that exact head,.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=100 -timeout=4m -run ^TestFailedBootstrap$ ./pkg/logservicepassed in 21.742s. This closes the reported race without sleeps, retries, exclusions, or production changes.test(logservice): synchronize TestFailedBootstrap (#28553)
gouhongshen commentedon Sep 10, 2026
PR #28553 has merged and is awaiting manual validation. The issue remains open.
test(logservice): synchronize TestFailedBootstrap (matrixorigin#28553)
test(logservice): synchronize TestFailedBootstrap (matrixorigin#28553)
test(logservice): synchronize TestFailedBootstrap (matrixorigin#28553)