Skip to content

fix listing bug in v1 and add missing v1 version listing #1405

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

Merged

Conversation

prakashsvmx
Copy link
Member

@prakashsvmx prakashsvmx commented Apr 30, 2025

Fixes #1403

Other fixes which were not updated over a period of time:


in v1 ,

  • Listing of versions ( one object having 1000+ versions)

Test scenarios:

  • Buckets with many objects 2k+
  • Objects with many versions 2k+
Test Script
import * as Minio from 'minio'
import * as fs from 'node:fs'

var minioClient = new Minio.Client({
  endPoint: 'localhost',
  port: 22000,
  useSSL: false,
  accessKey: 'minio',
  secretKey: 'minio123',
  //pathStyle:true
})

function listObjects() {
  var bucketName = 'test-bucket-v'
  let counter = 0
  const listPromise = minioClient.listObjects(bucketName, '', true, {
    IncludeVersion: false,
    MaxKeys: 10000,
  })
  //minioClient.listObjectsV2(bucketName, "",true)

  listPromise.on('data', function (obj) {
    counter += 1
  })

  listPromise.on('end', function () {
    console.log('End. Total Objects = ' + counter)
  })

  listPromise.on('error', function (err) {
    console.log(err)
  })
}

listObjects()

@harshavardhana harshavardhana merged commit fbcfe63 into minio:master Apr 30, 2025
12 checks passed
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.

listobjects endless loop, with more than 2000 objects in bucket
2 participants