]> source.dussan.org Git - gitea.git/commit
Reduce memory usage for chunked artifact uploads to MinIO (#31325) (#31338)
authorGiteabot <teabot@gitea.io>
Wed, 12 Jun 2024 14:25:46 +0000 (22:25 +0800)
committerGitHub <noreply@github.com>
Wed, 12 Jun 2024 14:25:46 +0000 (16:25 +0200)
commitb1ad8ccb7323b8e517fc39f5e37a7a74574c16f2
treef9bd8ddea633dff551774098b517313dfbadb337
parent758f84f33e8051be99927734f9b0c20ec64701ae
Reduce memory usage for chunked artifact uploads to MinIO (#31325) (#31338)

Backport #31325 by @bohde

When using the MinIO storage driver for Actions Artifacts, we found that
the chunked artifact required significantly more memory usage to both
upload and merge than the local storage driver. This seems to be related
to hardcoding a value of `-1` for the size to the MinIO client [which
has a warning about memory usage in the respective
docs](https://pkg.go.dev/github.com/minio/minio-go/v7#Client.PutObject).
Specifying the size in both the upload and merge case reduces memory
usage of the MinIO client.

Co-authored-by: Rowan Bohde <rowan.bohde@gmail.com>
Co-authored-by: Kyle D <kdumontnu@gmail.com>
routers/api/actions/artifacts_chunks.go