MinIO : disable multi-part upload for small files
Closed this issue · 0 comments
Describe the problem to be solved
It looks like the upload function in https://github.com/gristlabs/grist-core/blob/main/app/server/lib/MinIOExternalStorage.ts always uploads files in multiple parts. This seems quite unnecessary for small files like meta.json or small attachements, and may lead to issues when the MinIO server restarts in the middle of an upload (as Grist tries to resume the upload seemingly forever until you restart the docWorker).
Describe the solution you would like
Make sure that small files are uploaded in one go instead of as a multi-part object.
Looking at the MinIO documentation, my huntch is that passing the optional-but-recommended size parameter to the putObject method, or using the fputObject method should let the minIO client decide how best to upload files.