carlos / platform Public

lease-sleep-snapshot-count

Test-only (#897). TestSleepReleaseWritesNoSnapshot guards the held-requests move-speed change (32a59ad): a drain release writes a snapshot, a sleep release must not. On CI it saw one snapshot. The stack shows it came from litestream's store monitor (Store.monitorCompactionLevel -> CompactDB -> DB.Snapshot), which writes a fresh replica's first snapshot about a second after open, on the store's context. Under load that landed inside the release. The release path is unchanged and correct: Finish never snapshots.

Both release-snapshot tests now mark their release calls' context, and the fake counts only snapshots written on it. Witness: with a 1.5 s pause before Finish, the old test fails with the CI message every time and the new one passes. With Finish mutated to snapshot, the new test fails, so it still guards 32a59ad. The whole internal/lease package passes.

Commits 1
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity