mirror of
https://github.com/sbt/sbt.git
synced 2026-09-06 17:40:06 +02:00
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]>
16 lines
808 B
Markdown
16 lines
808 B
Markdown
### 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][i9349].
|
|
|
|
[i9349]: https://github.com/sbt/sbt/issues/9349
|