Release unused file buffers for empty artifacts
This commit is contained in:
@@ -131,9 +131,10 @@ fallback.
|
||||
Regular files are read synchronously in bounded chunks. The opened file's size
|
||||
is only an initial-capacity hint, capped at 1 MiB; reads continue to EOF, and
|
||||
the returned body determines artifact size and hash. If an overreported hint
|
||||
leaves more than twice the actual body length unused, the completed body is
|
||||
copied to release the excess backing storage. Cancellation is checked before
|
||||
opening, before and after every read, and before publishing the artifact, so a
|
||||
leaves unused capacity greater than the actual body length, the completed body
|
||||
is copied to release the excess backing storage, including when the body is
|
||||
empty. Cancellation is checked before opening, before and after every read,
|
||||
and before publishing the artifact, so a
|
||||
canceled read never publishes partial content. The ordinary reader does not
|
||||
detach file reads into background goroutines.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user