Skip to content

Count Git-lock placeholder rejections in heartbeat telemetry - #2168

Merged
Tyrie Vella (tyrielv) merged 2 commits into
microsoft:masterfrom
tyrielv:tyrielv/placeholder-lock-heartbeat
Nov 11, 2026
Merged

Tyrie Vella (tyrielv) merged 2 commits into
microsoft:masterfrom
tyrielv:tyrielv/placeholder-lock-heartbeat

Conversation

@tyrielv

Copy link
Copy Markdown
Contributor

Problem and Context

The Git command lock can prevent GVFS from creating a placeholder for a projected file. GVFS rejects that callback with FileNotFound. Successful placeholder telemetry does not count these rejections.

The existing negative-cache counter controls cache maintenance. Cache clears reset that counter, so it cannot supply a heartbeat interval total.

Changes

  • Add FilePlaceholderCreationBlockedForGit to heartbeat metadata as an independent atomic 64-bit counter. Each heartbeat atomically collects and resets its interval count.
  • Count only callbacks that reach the Git-lock rejection branch. The count does not represent unique files, unique opens, or all application-visible FileNotFound responses. Either Git or another process can trigger a callback.
  • Preserve placeholder decisions, command-lock exemptions, successful-creation counters, and cache maintenance. A nonzero rejection count also includes the heartbeat in the local log.
  • Extend the existing projection test setup so tests exercise the real cache-maintenance methods without an index parser.
  • Add unit tests for rejection totals, interval resets, concurrent increments, cache-clear independence, and other placeholder outcomes. These tests assert that unrelated placeholder activity does not increase the counter.

Keep the heartbeat count separate from negative-cache maintenance. Collect and reset each interval atomically, and add tests for rejection scope, concurrent increments, and cache independence.

Assisted-by: GPT-6.1 Sol

Signed-off-by: Tyrie Vella <[email protected]>
Wait for all dedicated writers before the heartbeat loop. Bound the writer waits and heartbeat samples, and increase the workload to exercise contended counter updates.

Assisted-by: GPT-6.1 Sol

Signed-off-by: Tyrie Vella <[email protected]>
@tyrielv
Tyrie Vella (tyrielv) marked this pull request as ready for review November 11, 2026 21:30
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ No issues found · iteration 1 (322fb95)

Approach: Right place: one atomic counter at the sole Git-lock rejection callback, reported beside the Heartbeat's placeholder counters and kept apart from the cache-control counter that clears reset.

Validation

  • ✅ GVFS.UnitTests at head + base: 0 failed
  • ✅ 7 distinct mutants of the change killed
  • ✅ Heartbeat e2e to log, pipe and collector
  • ✅ Concurrency: 20k callbacks exact, 3 runs
  • ✅ CI run 43087233368: 34/34 jobs green
  • ✅ Mount build + CommandLine.Tests 94/94
  • ⏭️ Real ProjFS mount / functional tests — not run

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon + approach review · reply on a thread to dispute

@tyrielv
Tyrie Vella (tyrielv) merged commit 9a38a00 into microsoft:master Nov 11, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants