Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry only if response region doesn't match cached region #1293

Merged
merged 1 commit into from
May 28, 2020

Conversation

kannappanr
Copy link
Collaborator

Trying to do list objects using a user credentials that does not have access to do list objects results in that command being retried multiple times and resulting in a delay of about 90 seconds

The following code will help in reproducing the issue

	
package main

import (
	"log"
	"os"
	"github.com/minio/minio-go/v6"
)

func main() {
	s3Client, err := minio.New("s3.amazonaws.com", "access", "secret", true)
	if err != nil {
		log.Fatalln(err)
	}
	doneCh := make(chan struct{})

	defer close(doneCh)

		s3Client.TraceOn(os.Stderr)
for object := range s3Client.ListObjects("bucket", "prefix", true, doneCh) {
		if object.Err != nil {
			log.Fatalln(err)
		}
		log.Println(object)
	}

}

@kannappanr kannappanr requested review from BigUstad and poornas and removed request for BigUstad May 28, 2020 15:06
@kannappanr kannappanr merged commit 6a226f4 into minio:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants