Stream content-addressed storage so an object can exceed heap

Featurekamo-shared-library
Ya
8 Agosti 2026, 02:36 UTC
Mwandishi
Kamo
Ahadi ya
67391b8

Chat attachments are moving to a 3 GiB ceiling. storeContentAddressed took a byte[], which cannot express that at all — a Java array stops at Integer.MAX_VALUE — and MinIOStorageService.upload then buffered the whole object a second time so it could retry the put against the next node. Adds a streaming path alongside both: HashUtils.computeDigests derives Blake3 and SHA3-256 from one pass, uploadStreaming re-opens an InputStreamSource per node attempt instead of holding the bytes, and the new storeContentAddressed overload hashes, dedups and stores without ever accumulating the content. Peak memory is the MinIO part buffer rather than the file size. It is deliberately not @Transactional: storing gigabytes takes minutes, and the row is only published (isMissing=false) once the object is durably stored, so a crash leaves the same state the buffered path leaves.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei