-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: There is an inherent race condition on ProjectedFS (Windows EdenFS) where, after an fs write, "status" doesn't reflect the write because EdenFS hasn't received the async notification from ProjFS. This can wreak all sorts of havoc since "status" is used in Sapling for almost everything. Mitigate the race condition on the Sapling side by writing a touch file before we call status, and then waiting until the status result contains the touch file. The idea is that once we see the touch file in the status result from eden, we can be confident that previous filesystem writes are also reflected. The "derace" mitigation is enabled with the Sapling config experimental.derace-eden-status-mode=info|fatal (only for Windows). "info" will not propagate an error if we fail to see the touch file, where "fatal" will propagate an error. You can use experimental.derace-eden-status-timeout to control how long Sapling waits for the touch file to show up _after_ the first status. Defaults to 3s (picked unscientifically by me). Reviewed By: MichaelCuevas Differential Revision: D66391999 fbshipit-source-id: 2a88d3feeef68f9d8680715eccc171c0c5fb1176
- Loading branch information
1 parent
bd30f00
commit 9f06877
Showing
2 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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