[ARVADOS] updated: 1.2.0-355-g05d05d235
Git user
git at public.curoverse.com
Tue Nov 13 11:45:45 EST 2018
Summary of changes:
services/keepstore/s3_volume.go | 7 +++++++
1 file changed, 7 insertions(+)
via 05d05d2353eec944aedfdbe565309895dcbc747d (commit)
from dd18d18ffbdcf1c7e01232bce587df2169fdfca6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 05d05d2353eec944aedfdbe565309895dcbc747d
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Tue Nov 13 11:43:28 2018 -0500
14397: Add comment about memory implications of providing SHA256.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/services/keepstore/s3_volume.go b/services/keepstore/s3_volume.go
index 19c4fe540..fb978fe2b 100644
--- a/services/keepstore/s3_volume.go
+++ b/services/keepstore/s3_volume.go
@@ -403,6 +403,13 @@ func (v *S3Volume) Put(ctx context.Context, loc string, block []byte) error {
return err
}
opts.ContentMD5 = base64.StdEncoding.EncodeToString(md5)
+ // In AWS regions that use V4 signatures, we need to
+ // provide ContentSHA256 up front. Otherwise, the S3
+ // library reads the request body (from our buffer)
+ // into another new buffer in order to compute the
+ // SHA256 before sending the request -- which would
+ // mean consuming 128 MiB of memory for the duration
+ // of a 64 MiB write.
opts.ContentSHA256 = fmt.Sprintf("%x", sha256.Sum256(block))
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list