Do not store in-memory files on disk #26898
Open
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.
The documentation for
--experimental_inmemory_dotd_files
and--experimental_inmemory_jdeps_files
states '...instead of being written to disk', but the files were actually written to both memory and disk (unless combined with BwoB). This caused two problems:Unnecessary overhead from remotely downloading all in-memory files twice.
Paradoxically reduced robustness of
--remote_download_all
: that flag normally increases Bazel’s resilience to remote cache issues, but because these outputs were kept in memory instead of being written to disk by RemoteSpawnCache.lookup (which handles cache issues gracefully), action finalization treated them as missing on disk and attempted a more fragile download, increasing the risk for "unable to finalize action" failures (see Bazel 7 unable to finalize action due to missing digest for.d
files when--experimental_inmemory_dotd_files
is set. #22387).This change ensures that in-memory files are kept exclusively in memory and are not written to disk. This aligns with the documentation and addresses both problems.
Fixes #22387