Filter out tiering metadata during CopyObject (#15936)

This commit is contained in:
Krishnan Parthasarathi
2022-10-24 16:32:31 -07:00
committed by GitHub
parent 1633b30979
commit 0c34e51a75
2 changed files with 28 additions and 16 deletions

View File

@@ -909,6 +909,11 @@ func getCpObjMetadataFromHeader(ctx context.Context, r *http.Request, userMeta m
// to change the original one.
defaultMeta := make(map[string]string, len(userMeta))
for k, v := range userMeta {
// skip tier metadata when copying metadata from source object
switch k {
case metaTierName, metaTierStatus, metaTierObjName, metaTierVersionID:
continue
}
defaultMeta[k] = v
}