Skip to content

Commit 24fcda7

Browse files
committed
docs: address inefficiency in S3 object digest calculation
1 parent d391b70 commit 24fcda7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/sync/s3.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ func pushS3WithSession(ctx context.Context, s3Session *s3.S3, bucket *string, im
192192
}
193193

194194
func syncObject(ctx context.Context, s3Session *s3.S3, bucket *string, key string, acl *string, contentType *string, r io.ReadSeeker) error {
195+
// FIXME: we are reading the object every time to calculate the digest. This is inefficient.
195196
h := sha256.New()
196197
if _, err := io.Copy(h, r); err != nil {
197198
return err

0 commit comments

Comments
 (0)