Skip to content

Commit

Permalink
Don't request metadata when listing objects
Browse files Browse the repository at this point in the history
While some implementations may support it, it appears that most don't,
and some may in fact return an error if it is requested.

We already stat the object to get the metadata anyway, so this was
unnecessary if harmless on most implementations.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Nov 21, 2023
1 parent e3ea0ae commit 0473839
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/etcd/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ func (s *S3) listSnapshots(ctx context.Context) (map[string]snapshotFile, error)
defer cancel()

opts := minio.ListObjectsOptions{
Prefix: s.config.EtcdS3Folder,
Recursive: true,
WithMetadata: true,
Prefix: s.config.EtcdS3Folder,
Recursive: true,
}

objects := s.client.ListObjects(ctx, s.config.EtcdS3BucketName, opts)
Expand Down

0 comments on commit 0473839

Please sign in to comment.