From ae4fb1b72e5abec12d43b5dfc143a2f5915b7951 Mon Sep 17 00:00:00 2001 From: Praveen raj Mani Date: Tue, 2 Apr 2024 12:18:26 +0530 Subject: [PATCH] Prioritize the bucket configs first during the decommissioning (#19393) --- cmd/erasure-server-pool-decom.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/cmd/erasure-server-pool-decom.go b/cmd/erasure-server-pool-decom.go index 4ca751350..6c5635030 100644 --- a/cmd/erasure-server-pool-decom.go +++ b/cmd/erasure-server-pool-decom.go @@ -1404,16 +1404,18 @@ func (z *erasureServerPools) getBucketsToDecommission(ctx context.Context) ([]de // Buckets data are dispersed in multiple zones/sets, make // sure to decommission the necessary metadata. - decomBuckets = append(decomBuckets, decomBucketInfo{ - Name: minioMetaBucket, - Prefix: minioConfigPrefix, - }) - decomBuckets = append(decomBuckets, decomBucketInfo{ - Name: minioMetaBucket, - Prefix: bucketMetaPrefix, - }) + decomMetaBuckets := []decomBucketInfo{ + { + Name: minioMetaBucket, + Prefix: minioConfigPrefix, + }, + { + Name: minioMetaBucket, + Prefix: bucketMetaPrefix, + }, + } - return decomBuckets, nil + return append(decomMetaBuckets, decomBuckets...), nil } func (z *erasureServerPools) StartDecommission(ctx context.Context, indices ...int) (err error) {