From 40a2c6b882aee42ff5c50911451f15b232f13fa7 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 9 Nov 2022 15:57:34 -0800 Subject: [PATCH] Return remote tier as StorageClass for transitioned objects (#16035) --- cmd/erasure-metadata.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/erasure-metadata.go b/cmd/erasure-metadata.go index e4aebc0e4..794dc5328 100644 --- a/cmd/erasure-metadata.go +++ b/cmd/erasure-metadata.go @@ -168,7 +168,9 @@ func (fi FileInfo) ToObjectInfo(bucket, object string, versioned bool) ObjectInf objInfo.Parts = fi.Parts // Update storage class - if sc, ok := fi.Metadata[xhttp.AmzStorageClass]; ok { + if fi.TransitionTier != "" { + objInfo.StorageClass = fi.TransitionTier + } else if sc, ok := fi.Metadata[xhttp.AmzStorageClass]; ok { objInfo.StorageClass = sc } else { objInfo.StorageClass = globalMinioDefaultStorageClass