Skip to content

Commit

Permalink
increasingly more verbose logging for s3.Writer
Browse files Browse the repository at this point in the history
  • Loading branch information
alichay committed Feb 13, 2024
1 parent 5bb0f87 commit 9bd38fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions registry/storage/driver/s3-aws/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ func (d *driver) Writer(ctx context.Context, path string, appendMode bool) (stor
key := d.s3Path(path)
if !appendMode {
// TODO (brianbland): cancel other uploads at this path
logrus.Warnf("s3.go:Writer() | not append! creating new upload for %s", path)
resp, err := d.S3.CreateMultipartUploadWithContext(ctx, &s3.CreateMultipartUploadInput{
Bucket: aws.String(d.Bucket),
Key: aws.String(key),
Expand Down Expand Up @@ -943,6 +944,7 @@ func (d *driver) copy(ctx context.Context, sourcePath string, destPath string) e
return nil
}

logrus.Warnf("s3.go:copy() | manually copying %s -> %s", sourcePath, destPath)
createResp, err := d.S3.CreateMultipartUploadWithContext(ctx, &s3.CreateMultipartUploadInput{
Bucket: aws.String(d.Bucket),
Key: aws.String(d.s3Path(destPath)),
Expand Down Expand Up @@ -1448,6 +1450,7 @@ func (w *writer) Write(p []byte) (int, error) {
return 0, err
}

logrus.Warnf("s3.go:writer.Write() | bytes left < min chunk size. creating new upload for %s", w.key)
resp, err := w.driver.S3.CreateMultipartUploadWithContext(w.ctx, &s3.CreateMultipartUploadInput{
Bucket: aws.String(w.driver.Bucket),
Key: aws.String(w.key),
Expand Down

0 comments on commit 9bd38fe

Please sign in to comment.