You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disk cache commit reports success after unsuccessful publication #3
DiskCacheEntry::commit() treats every failed rename as a competing writer successfully publishing the entry. If the destination is incomplete, it deletes the completed temporary build and returns the incomplete destination with hit and committed set to true. A permission failure can return a path that does not exist at all.
Reproduced at 8b3ef868705a3792cc1a14ab570b539f72fd3d94 on Linux:
Obtain a cache miss and write a payload into entry.path.
Create entry.commit_path with a partial file and no .committed marker.
Call entry.commit(). Renaming over the nonempty destination fails.
The call nevertheless returns that destination as successful, and the temporary payload is gone.
Repeating the operation against the same incomplete destination fails the same way. Denying write permission on the destination parent also produces false success. Normal publication and reuse of a competing committed entry pass their control cases.
Expected: reuse the destination only when a committed entry is visible there. Otherwise report the original rename error and keep the temporary build available for retry or cleanup when the entry is destroyed. After a failed rename, leave the incomplete destination untouched.
The unchecked fallback is in DiskCacheEntry::commit. It affects both backends through the shared runtime: compile_without_load() can return an invalid artifact path, while compile() subsequently fails loading the binary.
Activity