mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
use GlobalContext whenever possible (#9280)
This change is throughout the codebase to ensure that all codepaths honor GlobalContext
This commit is contained in:
@@ -817,7 +817,7 @@ func (o *ObjectInfo) EncryptedSize() int64 {
|
||||
// This cannot happen since AWS S3 allows parts to be 5GB at most
|
||||
// sio max. size is 256 TB
|
||||
reqInfo := (&logger.ReqInfo{}).AppendTags("size", strconv.FormatUint(size, 10))
|
||||
ctx := logger.SetReqInfo(context.Background(), reqInfo)
|
||||
ctx := logger.SetReqInfo(GlobalContext, reqInfo)
|
||||
logger.CriticalIf(ctx, err)
|
||||
}
|
||||
return int64(size)
|
||||
@@ -845,7 +845,7 @@ func DecryptCopyObjectInfo(info *ObjectInfo, headers http.Header) (errCode APIEr
|
||||
}
|
||||
var err error
|
||||
if info.Size, err = info.DecryptedSize(); err != nil {
|
||||
errCode = toAPIErrorCode(context.Background(), err)
|
||||
errCode = toAPIErrorCode(GlobalContext, err)
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user