From a92c4a0f176ca29ce5f270e8875ac23bb12cc3b6 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Tue, 21 Nov 2023 19:57:34 +0000 Subject: [PATCH] Don't request metadata when listing objects 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 --- pkg/etcd/s3.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/etcd/s3.go b/pkg/etcd/s3.go index 1e96ebabb1..de5ebd36fe 100644 --- a/pkg/etcd/s3.go +++ b/pkg/etcd/s3.go @@ -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)