converge WARM tier object name to hash of deployment+bucket (#18410)

this is to ensure that we can converge and save IOPs
when hot-tier accesses MinIO.
This commit is contained in:
Harshavardhana 2023-11-10 02:15:13 -08:00 committed by GitHub
parent 117ad1b65b
commit 80adc87a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,7 @@ import (
"github.com/minio/minio/internal/s3select" "github.com/minio/minio/internal/s3select"
"github.com/minio/pkg/v2/env" "github.com/minio/pkg/v2/env"
"github.com/minio/pkg/v2/workers" "github.com/minio/pkg/v2/workers"
"github.com/zeebo/xxh3"
) )
const ( const (
@ -444,7 +445,8 @@ func genTransitionObjName(bucket string) (string, error) {
return "", err return "", err
} }
us := u.String() us := u.String()
obj := fmt.Sprintf("%s/%s/%s/%s/%s", globalDeploymentID(), bucket, us[0:2], us[2:4], us) hash := xxh3.HashString(pathJoin(globalDeploymentID(), bucket))
obj := fmt.Sprintf("%s/%s/%s/%s", strconv.FormatUint(hash, 16), us[0:2], us[2:4], us)
return obj, nil return obj, nil
} }