support encrypted/compressed objects properly during decommission (#15320)

fixes #15314
This commit is contained in:
Harshavardhana
2022-07-16 19:35:24 -07:00
committed by GitHub
parent 876970baea
commit 7da9e3a6f8
11 changed files with 367 additions and 28 deletions

View File

@@ -646,8 +646,9 @@ func NewGetObjectReader(rs *HTTPRangeSpec, oi ObjectInfo, opts ObjectOptions) (
return nil, 0, 0, err
}
// if object is encrypted and it is a restore request, fetch content without decrypting.
if opts.Transition.RestoreRequest != nil {
// if object is encrypted and it is a restore request or if NoDecryption
// was requested, fetch content without decrypting.
if opts.Transition.RestoreRequest != nil || opts.NoDecryption {
isEncrypted = false
isCompressed = false
}