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

Add parameter to ListObjectsV2 to make the iteration interruptible #733

Closed
AlloVince opened this issue Nov 18, 2018 · 1 comment
Closed

Comments

@AlloVince
Copy link

AlloVince commented Nov 18, 2018

Hi guys

Currently the ListObjectsV2 in SDK is not able to start a iteration in halfway, for some small cases it is ok. But in my project, a bucket have over 100k items, if any failing happened, I have to re-start the whole iteration from the first item, it is really unacceptable for a large bucket

According to discussion of issue 6825, go lang core API already had a start-after parameter, I think the SDK should support this too, for example:

var stream = minioClient.listObjectsV2('mybucket','', true)
var lastCursor = null;
stream.on('data', function(obj) { lastCursor = obj.cursor } )

if iteration failed, input cursor as startAfter will continue last task:

var stream = minioClient.listObjectsV2({
  bucket: 'mybucket',
  prefix: '',
  recursive: true,
  startAfter: lastCursor
})

Looking forward for this feature, this is really important, thanks.

@kannappanr
Copy link
Contributor

@AlloVince Thanks for filing the issue here. We will try to implement this feature soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants