mirror of https://github.com/minio/minio.git
Calculate correct object size while replication (#19888)
It was missing in case of `replicateObject` but was present for `replicateAll` already Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
This commit is contained in:
parent
0fbb945e13
commit
2f6e03fb60
|
@ -1227,17 +1227,23 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj
|
||||||
// make sure we have the latest metadata for metrics calculation
|
// make sure we have the latest metadata for metrics calculation
|
||||||
rinfo.PrevReplicationStatus = objInfo.TargetReplicationStatus(tgt.ARN)
|
rinfo.PrevReplicationStatus = objInfo.TargetReplicationStatus(tgt.ARN)
|
||||||
|
|
||||||
size, err := objInfo.GetActualSize()
|
// Set the encrypted size for SSE-C objects
|
||||||
if err != nil {
|
var size int64
|
||||||
replLogIf(ctx, err)
|
if crypto.SSEC.IsEncrypted(objInfo.UserDefined) {
|
||||||
sendEvent(eventArgs{
|
size = objInfo.Size
|
||||||
EventName: event.ObjectReplicationNotTracked,
|
} else {
|
||||||
BucketName: bucket,
|
size, err = objInfo.GetActualSize()
|
||||||
Object: objInfo,
|
if err != nil {
|
||||||
UserAgent: "Internal: [Replication]",
|
replLogIf(ctx, err)
|
||||||
Host: globalLocalNodeName,
|
sendEvent(eventArgs{
|
||||||
})
|
EventName: event.ObjectReplicationNotTracked,
|
||||||
return
|
BucketName: bucket,
|
||||||
|
Object: objInfo,
|
||||||
|
UserAgent: "Internal: [Replication]",
|
||||||
|
Host: globalLocalNodeName,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if tgt.Bucket == "" {
|
if tgt.Bucket == "" {
|
||||||
|
|
Loading…
Reference in New Issue