Skip to content

recordengine: TestMergeWritersHoldAdmittedShare saw writers report above their limit on Windows #748

Open

Description

@tdakkota

The failure

TestMergeWritersHoldAdmittedShare (recordengine/mergewriters_internal_test.go, added by #729) failed once on Windows CI in run 36474815871, at #747's commit 8599a77. #747 doesn't touch the record engine's merge code, and the next run passed.

mergewriters_internal_test.go:128: unbounded: writers report 93.4 MiB, heap 110.6 MiB
mergewriters_internal_test.go:129: share 32.0 MiB: grant 71.9 MiB, writers limited to 27.2 MiB, report 27.6 MiB (one append 10.4 MiB), heap 45.2 MiB
Error: "28907943" is not less than or equal to "28486562"

Why it may not be only noise

The failed assertion compares the writers' own reported resident bytes with their limit, not a GC-sensitive heap sample. The report was 27.6 MiB against a 27.2 MiB limit, about 0.4 MiB over. So in this run, the writers held more than their share, as they themselves report.

Candidate causes:

  • A sequence that depends on timing, where one append (10.4 MiB here) is admitted against a stale reading.
  • A platform difference in how the resident bytes are sampled.

Either way, #729's contract is that the limit is never exceeded. So this needs a look before it is written off as flaky.

To do

  • Reproduce it with -count and a stress loop, on Linux and Windows if possible.
  • Find which append crossed the limit, and whether the admission check read a stale value.
  • Fix the bound, or document the exact slack the contract allows and assert against that.

Related: #729.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KcLq1G8KpWBvM53JaQb1tS

Activity

  1. added
    flaky-testIntermittently failing test
    area/recordengineRecord engine (logs, traces, profiles, exemplars)
    on Sep 28, 2026
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/recordengineRecord engine (logs, traces, profiles, exemplars)flaky-testIntermittently failing test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions