[bitnami/minio] Fix the image startup problem (#30808)

Fix the image startup problem

Image startup scans all the first-level directories of bucket through mc ls to determine whether bucket exists or skips. In a normal scenario, this is not a problem, but when there are a large number of files in the first-level directory of bucket, it will become a disaster. In my scene, there are millions or even tens of millions of files in a first-level directory under bucket. When the image is restarted, it will take up a lot of disk io. If the underlying use is file storage such as nas, this will be more intolerable

Signed-off-by: Puppet <56722758+PuppetA17@users.noreply.github.com>
This commit is contained in:
Puppet 2023-04-20 16:15:28 +08:00 committed by GitHub
parent bab19b32dc
commit ad7d3dde00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@
# Boolean
minio_client_bucket_exists() {
local -r bucket_name="${1:?bucket required}"
if minio_client_execute ls "${bucket_name}" >/dev/null 2>&1; then
if minio_client_execute stat "${bucket_name}" >/dev/null 2>&1; then
true
else
false