Skip to content

ci: e2e engine package runs at the 15m timeout (TestReseedHorizonRate under -race -coverpkg) #750

Open

Description

@tdakkota

The flake

The e2e workflow runs go test -timeout 15m -race -v -coverpkg=./... ./.... The engine package now runs within seconds of that timeout:

This isn't a regression. On the same machine, with -race, the test takes 13.3s on both origin/main and #749. The CI cost comes from -coverpkg=./..., which instruments every package, on a slower runner. The test runs 300 flush+merge cycles over 400 series.

Direction

Cut the cost of that one test under the e2e profile rather than raising the timeout for everything. Options:

  • skip it under -race or testing.Short, since it is a measurement that logs its numbers;
  • fewer cycles when instrumented;
  • move it to the benchmark job.

Alternatively, give the engine package its own e2e step with its own timeout.

Related: #725 (seen on #749).

🤖 Generated with Claude Code

https://claude.ai/code/session_01KcLq1G8KpWBvM53JaQb1tS

Activity

  1. added
    flaky-testIntermittently failing test
    area/ciCI, benchmarks, test infrastructure
    on Sep 28, 2026
  2. tdakkota commented on Sep 29, 2026

    @tdakkota
    ContributorAuthor

    Cause: CPU, not waiting

    TestReseedHorizonRate has no sleeps or timers and runs against the in-memory backend. It is a measurement test:

    • 300 cycles of 16 × 400 samples, which is 1.9M rows;
    • a flush, a merge and two full index loads per cycle;
    • a 64 KiB MaxPartBytes, so parts turn over constantly.

    A CPU profile of the plain run spreads across the codecs (float/timestamp encode and decode, part cursors, zstd) and GC. There is no hotspot and no idle time.

    Profile Time
    plain ~1.4 s
    -race ~13 s
    -race -coverpkg=./... (the e2e job), measured locally on main ~165 s
    same, on the CI runner ~714 s

    Coverage multiplies the race time by about 12×. Under -race, coverage runs in atomic mode, so every basic block in every package does an atomic increment. This test's hot path is tight per-value codec loops. The CI runner is about 4× slower again.

    Suggested fix

    Keep a small run in normal test runs, for example 20 cycles, which is enough for the two assertions (merge-consumed parts stay accounted for; live parts stay under MaxWants). Run the full 300-cycle measurement only without race and coverage, or behind an opt-in flag. TestReseedHorizonWithRetention has the same shape and needs the same treatment.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01KcLq1G8KpWBvM53JaQb1tS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciCI, benchmarks, test infrastructurearea/engineMetrics engineflaky-testIntermittently failing test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions