-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Don't persist cache files that error while writing (#1579)
This adds an early return in memory.rs so that if an InternalError is returned by a cache computation¹, we don't attempt to write the error and don't persist the temp file. This kills two birds with one stone: 1. It fixes the "Internal errors should never be written out" issue we see in Sentry. 2. More importantly, if a computation fails with an InternalError because of lack of disk space, we discard the resulting file immediately instead of preserving its (likely useless) contents. Moreover, I also added some extra validation after symcache/ppdbcache/sourcemapcache conversion. Now, if somehow the write goes through but the file is invalid, we also return an InternalError and it will be deleted. This costs us nothing because parsing these files is essentially free.
- Loading branch information
1 parent
717bb0b
commit 3998e5b
Showing
5 changed files
with
104 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
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