Skip to content

[Bug]: TestDeleterConcurrentDelete flakes on wall-clock threshold under runner load #26643

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing open and closed issues for TestDeleterConcurrentDelete and its assertion message.

Branch Name

main

Commit ID

Observed on PR head 267c54ecda4345aa76e23f03e8ad88548028cf1c; the failing test and GC deleter code are unchanged by that PR and match its base.

Other Environment Information

Actual Behavior

pkg/vm/engine/tae/db/gc/v3.TestDeleterConcurrentDelete fails under runner load even though all four deletion batches execute concurrently and all 20 files are deleted exactly once.

The mock gives each Delete call a 10 ms delay. The test then requires the whole operation to finish in less than 35 ms. In the failing run, all four batch log entries completed together at approximately 40.61–40.69 ms and the whole call took 42.308822 ms:

GC-ExecDelete-Batch ... duration=40.610704ms
GC-ExecDelete-Batch ... duration=40.693414ms
GC-ExecDelete-Batch ... duration=41.626438ms
GC-ExecDelete-Batch ... duration=41.613545ms

deleter_test.go:156:
Error: "42.308822ms" is not less than "35ms"
Test: TestDeleterConcurrentDelete
Messages: Concurrent deletion should be faster than sequential

The result demonstrates scheduler/runner delay, not sequential execution: the four batches overlap and finish within about 1 ms of each other.

Expected Behavior

The unit test should prove that deletion batches overlap without depending on an absolute wall-clock threshold that can be exceeded by a loaded CI runner. A deterministic mock barrier or maximum-in-flight assertion can verify concurrency directly while retaining the existing exact deletion-count checks.

Steps to Reproduce

  1. Run the Ubuntu/x86 unit-test job on a loaded shared runner, or repeatedly run:

    go test -run '^TestDeleterConcurrentDelete$' -count=100 ./pkg/vm/engine/tae/db/gc/v3
  2. Observe that a scheduler pause can make the operation exceed 35 ms even though the four worker batches overlap.

  3. Compare the four GC-ExecDelete-Batch timestamps/durations with the failing assertion.

Additional information

  • The failure is unrelated to PR fix(frontend): support native bit pick keys #26611, which changes only pkg/frontend/data_branch_pick.go, its unit tests, and a DATA BRANCH PICK BVT.
  • All other completed checks for that PR passed, including frontend unit coverage and BVT jobs.
  • There is an old unmerged branch commit (911aa8cd5a701d8da11e8dc128028195739e0b9b) that widened the threshold to 60 ms. A deterministic concurrency assertion would avoid replacing one timing-dependent threshold with another.

Metadata

Metadata

Assignees

Labels

ai-easykind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions