Increase the buffer size of objects channel in removeObjectsOneByOne

I guess this is pretty reasonable to have the working queue with the same
size as the maximum number of workers.
This commit is contained in:
Alexander Narsudinov 2023-10-27 20:47:25 +02:00
parent d3e89f164b
commit 6a7b88e788

View file

@ -171,7 +171,7 @@ func (client *s3Client) removeObjects(bucketName, prefix string) error {
// will delete files one by one without file lock
func (client *s3Client) removeObjectsOneByOne(bucketName, prefix string) error {
parallelism := 16
objectsCh := make(chan minio.ObjectInfo, 1)
objectsCh := make(chan minio.ObjectInfo, parallelism)
guardCh := make(chan int, parallelism)
var listErr error
var totalObjects int64 = 0