mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* perf(s3): assemble multipart uploads without doubling the object in heap CompleteMultipartUpload read every part with Files.readAllBytes into a growing ByteArrayOutputStream and then copied it again with toByteArray(), so a disk-backed upload briefly held several full-size copies of the object. Size one array from the part lengths and read each part straight into its slot, failing if a part changes size during assembly rather than producing a corrupt object. The composite ETag and full-object checksum are unchanged. * fix(s3): fail multipart assembly when a part grows after being measured The size check caught a part that shrank between being measured and being copied, but not one that grew: the read stopped at the measured size and the extra bytes were dropped. Disk parts are now checked for end of file after the measured bytes, and in-memory parts are copied from the arrays that were measured, whose length cannot change. * chore: rerun CI