[DO NOT MERGE] Stress test: ExpandedFileAttributesAreUpdated flaky timestamp fix#1922
Draft
tyrielv wants to merge 2 commits intomicrosoft:masterfrom
Draft
[DO NOT MERGE] Stress test: ExpandedFileAttributesAreUpdated flaky timestamp fix#1922tyrielv wants to merge 2 commits intomicrosoft:masterfrom
tyrielv wants to merge 2 commits intomicrosoft:masterfrom
Conversation
cc13a42 to
98eef81
Compare
tyrielv
added a commit
to tyrielv/VFSForGit
that referenced
this pull request
Mar 25, 2026
The test was flaky because it set all three timestamps on a single placeholder file at once. Setting CreationTime triggers ProjFS async hydration, and there is a ProjFS race where LastAccessTime can be silently dropped if it is set while hydration is still in progress. Fix: use a separate placeholder file for each property (CreationTime, LastAccessTime, LastWriteTime, Attributes) so each set+verify exercises an independent placeholder-to-full transition. Each property is verified with a retry loop using new FileInfo() on each attempt, since ProjFS hydration is asynchronous. Validated via stress testing in CI (PR microsoft#1922): - Original pattern: ~22% failure rate (LastAccessTime dropped) - Per-field pattern: verified via diagnostic tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
98eef81 to
264a46d
Compare
The test was flaky because setting CreationTime on a placeholder opens a write handle which triggers ProjFS to asynchronously hydrate the file. When LastAccessTime was set immediately after (while hydration was still in progress), ProjFS could silently drop the set. Diagnostics confirmed this is deterministic: the set is lost, not overwritten later. Fix: reorder the property sets so CreationTime (the only one that triggers hydration via handle open) is set LAST, after LastAccessTime, LastWriteTime, and Attributes are already pending on the placeholder. This ensures all metadata is in place before hydration begins. Also adds a post-hydration timestamp verification after the attribute retry loop to confirm all three timestamps persist through hydration. No production code in VFSForGit sets CreationTime on placeholder files, so this ProjFS race does not affect production behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8d917ab to
08719f4
Compare
…rsions Uses files from ForTests repo in separate directory subtrees. Reports via Assert.Pass message so results appear in CI output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
08719f4 to
94b7afb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.