Closed benterris closed 1 month ago
The code is not using minio-js sdk. looks like using aws sdk js. Please reach out to the respective forum. @benterris
there is no constructor named as referenced in the above piece of code.
new S3Client(
new ListObjectsV2Command
If you are using minio in production please consider https://min.io/pricing for valid subscription and direct engineering support.
We're using the
ListObjectsV2
command to list objects in a large folder. To do this we set aMaxKeys
value, and receive the list of objects by batch. Each command result has eitherisTruncated: true
(which means there are more objects to be listed), or eitherisTruncated: false
(which means we are done). For some values ofMaxKeys
however, we can receiveisTruncated: true
while all objects have been listed already.Expected behavior
We create a minio bucket with 3 objects and use
ListObjectV2
command to list objects in this bucket, withMaxKeys = 1
, and use the continuation token to retrieve the full content.We should receive 3 batches of 1 object, with the last batch having
isTruncated: true
.Current Behavior
We receive 3 batches of 1 object, and 1 batch of 0 objects. The last non-empty batch has
isTruncated: false
even though we're done listing. This does not happen withMaxKeys
>= 2 in this case, but we've seen this happen in production with other values ofMaxKeys
and a greater number of objects.Steps to Reproduce
Create a minio bucket and upload 3 objects. Run the following code:
The error will be thrown.
Your Environment
We're using
minio-js
v8.0.0, and the minio imagedocker.io/bitnami/minio:2024.6.13-debian-12-r2