Files
sbt/notes/2.0.0/cache-write-serialization-no-io.md
T
BrianHotoppandClaude Opus 4.8 67b8c54432 [2.x] fix: Keep file I/O out of cache-write serialization (#9496)
putBlobsIfNeeded reads each blob's hash and size once, up front, and
returns only plain HashedVirtualFileRef values, so serializing an ActionResult
(disk, in-memory, or remote store) performs no file I/O and nothing re-stats a
blob after its CAS entry is written: a file vanishing once stored no longer
prevents the write, and I/O errors on an output file surface upfront at blob
storage time rather than mid-serialization.

Fixes #9349

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-25 15:57:32 -04:00

808 B

Cache-write serialization no longer performs file I/O

Serializing a task's result for the action cache re-read the size of every referenced file at write time, so a file vanishing between the task completing and the cache write (for example when two overlapping evaluations of the same task race the jar-to-CAS-symlink swap) made an otherwise successful task's cache write throw an intermittent sjsonnew.SerializationException: error while writing the field outputFiles. Each stored output reference is now materialized once, before its blob is stored, so the cache write succeeds even if the file vanishes afterwards, and I/O errors on an output file surface upfront at blob storage time rather than mid-serialization.

This addresses #9349.