From 80adc87a14029db32eeab307c0f2223eda7a22e3 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 10 Nov 2023 02:15:13 -0800 Subject: [PATCH] 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. --- cmd/bucket-lifecycle.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/bucket-lifecycle.go b/cmd/bucket-lifecycle.go index b17ec1a32..7268a7535 100644 --- a/cmd/bucket-lifecycle.go +++ b/cmd/bucket-lifecycle.go @@ -43,6 +43,7 @@ import ( "github.com/minio/minio/internal/s3select" "github.com/minio/pkg/v2/env" "github.com/minio/pkg/v2/workers" + "github.com/zeebo/xxh3" ) const ( @@ -444,7 +445,8 @@ func genTransitionObjName(bucket string) (string, error) { return "", err } 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 }