Skip to content

[Bug]: Test_TxnExecutorExec flakes on embedded HAKeeper startup timeout under CI load #26299

Closed

Description

@jiangxinmeng1

What happened?

The Ubuntu/x86 unit-test job intermittently fails before Test_TxnExecutorExec reaches its SQL assertion because the embedded cluster cannot observe HAKeeper reaching the running state within the fixed two-minute startup timeout.

Failing job: https://github.com/matrixorigin/matrixone/actions/runs/30326473317/job/90172863760

Failure:

txn_executor_test.go:31: Received unexpected error:
    context deadline exceeded
    internal error: waitHAKeeperRunningLocked
--- FAIL: Test_TxnExecutorExec (124.17s)

The preceding log shows Dragonboat scheduler delay and repeated heartbeat/proposal timeouts, including batches of 8 and 16 LocalTick messages.

Why this appears flaky rather than PR-specific

The failure occurs in c.Start() before any SQL is executed. The failing PR has no changes under pkg/tests/txnexecutor, pkg/embed, or pkg/logservice. The exact test passed locally on both the PR head (14.22s) and a clean upstream/main worktree at 6004becb5 (13.36s). The same PR head also passed the coverage UT job.

Expected behavior

Test_TxnExecutorExec should not fail solely because a heavily loaded CI runner delays the embedded single-node HAKeeper election/startup. The test should also reuse or reliably clean up embedded cluster resources.

Possible direction

Reuse the package base cluster for this test, or otherwise make embedded-cluster startup and cleanup resilient to transient scheduler starvation without weakening the SQL assertion.

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions