-
-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only materialize immutable files once per process (#18600)
This PR removes `TempImmutableLargeFile` in favor of having the caller provide a writer function which writes to the `tokio::fs::File`, and we wrap the writing in the necessary setup/teardown code. This has a few benefits: - We can use a `OnceCell` to ensure the file is only trying to materialized by one thread - We can cleanup on error now (whoops that was embarrassing) - Eliminates a heisenbug I was seeing where we'd fail to hardlink with "No such file or directory". - I still don't understand the heisenbug, and I'm still worried we'd see it cross-process :cry: All in all, big win
- Loading branch information
1 parent
abeabac
commit c398899
Showing
4 changed files
with
155 additions
and
91 deletions.
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
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