Skip to content

Fix concurrent Pipeline Cache publication correctness - #173

Merged
David Federman (dfederm) merged 1 commit into
mainfrom
dfederm/fix-msbuildcache-concurrent-upload-correctness
Aug 7, 2026
Merged

Fix concurrent Pipeline Cache publication correctness#173
David Federman (dfederm) merged 1 commit into
mainfrom
dfederm/fix-msbuildcache-concurrent-upload-correctness

Conversation

@dfederm

Copy link
Copy Markdown
Member

Summary

This fixes a race in concurrent Pipeline Cache publication where selector state could be read, merged, and rewritten inconsistently, causing one publisher to lose another publisher’s selector or output identity. The change makes selector publication immutable/serialized, includes the complete selector in output identity, isolates the seed-6 protocol from the legacy layout, and retries conflict-winner visibility when the exact entry is not immediately readable. It also corrects CAS diagnostics so a null AddOrGetContentHashListResult is treated as successful acceptance of the submitted value.

Why this is safe

  • Scope is limited to concurrent publication and lookup paths; normal publish/restore behavior is preserved.
  • The new seed-6 layout isolates incompatible selector/output keys from legacy writers, so old and new protocols do not mix.
  • Conflict-winner retry only applies to required exact-key visibility; ordinary cache misses keep their existing behavior.
  • Selector publication now relies on immutable predecessor/successor keys instead of a read/merge/write race.

Testing

Test / build Result
dotnet build MSBuildCache.sln -c Release pass
dotnet test MSBuildCache.sln -c Release --no-build 532/532 passed

Serialize selector manifest updates through immutable predecessor keys, include complete selectors in output keys, and correct CAS publication diagnostics.

Copilot-Session: fd61beae-e1ef-4598-bf89-dfb81da6a1e1
@dfederm
David Federman (dfederm) merged commit e3ae742 into main Aug 7, 2026
7 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