Fix replication status reported on completion (#11273)

Fixes: #11272
This commit is contained in:
Poorna Krishnamoorthy
2021-01-13 11:52:28 -08:00
committed by GitHub
parent 628ef081d1
commit feaf8dfb9a
5 changed files with 8 additions and 8 deletions

View File

@@ -180,7 +180,7 @@ func checkReplicateDelete(ctx context.Context, bucket string, dobj ObjectToDelet
if gerr != nil {
validReplStatus := false
switch oi.ReplicationStatus {
case replication.Pending, replication.Complete, replication.Failed:
case replication.Pending, replication.Completed, replication.Failed:
validReplStatus = true
}
if oi.DeleteMarker && validReplStatus {
@@ -246,7 +246,7 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectVersionInfo, objectA
}
} else {
if dobj.VersionID == "" {
replicationStatus = string(replication.Complete)
replicationStatus = string(replication.Completed)
} else {
versionPurgeStatus = Complete
}
@@ -471,7 +471,7 @@ func replicateObject(ctx context.Context, objInfo ObjectInfo, objectAPI ObjectLa
return
}
}
replicationStatus := replication.Complete
replicationStatus := replication.Completed
if rtype != replicateAll {
gr.Close()

View File

@@ -993,7 +993,7 @@ func (i *crawlItem) healReplication(ctx context.Context, o ObjectLayer, oi Objec
case replication.Failed:
sizeS.failedSize += oi.Size
globalReplicationState.queueReplicaTask(oi)
case replication.Complete:
case replication.Completed, "COMPLETE":
sizeS.replicatedSize += oi.Size
case replication.Replica:
sizeS.replicaSize += oi.Size