Repository navigation
Offer only freshly encoded packs, failing only on allocation, and pin evicted-pack misses with tests - #12663
Merged
Conversation
A pack another roc's sweep deletes between listing its directory and reading it is now no offer instead of making the whole object cache unavailable, and an offer to an unavailable cache is dropped rather than failing the build. Sweeps of one cache root take sweep.lock so concurrent sweeps no longer evict past the size bound, and a file that disappears after a sweep lists it counts toward the bound. Fixes #12626
offerPack takes only bytes the same command just encoded, so the only failure it can report is allocation; a pack that fails to decode or index is a compiler bug. This leaves preparing package dev packs no path that turns an offer into NativeCompilationFailed.
rtfeldman
marked this pull request as ready for review
October 28, 2026 03:39
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.
Parallel builds on a cache at its size bound failed with
PackDirectoryUnreadableand thenNativeCompilationFailedwhen anotherrocevicted a dev pack after the loader listed its directory but before it read the file. The loader now treats such a pack as no offer, cache maintenance runs under an exclusive lock, and builds register their own packs through the indexed store; this adds the regression test for the evicted pack. It also narrowsofferPackto fail only on allocation: an offer to an unavailable cache is dropped, since that cache serves no lookup, and an offered pack the command itself encoded failing to decode is a compiler invariant.Fixes #12626