From 213104642772898d5ea5407ab34c7f4fb019dda1 Mon Sep 17 00:00:00 2001 From: Poorna Date: Tue, 16 May 2023 15:35:08 -0700 Subject: [PATCH] replication: fix audit log reporting (#17222) --- cmd/bucket-replication.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index c530573ab..b0cff11bd 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -1031,11 +1031,13 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje }(i, tgt) } wg.Wait() + + replicationStatus = rinfos.ReplicationStatus() // used in defer function // FIXME: add support for missing replication events // - event.ObjectReplicationMissedThreshold // - event.ObjectReplicationReplicatedAfterThreshold eventName := event.ObjectReplicationComplete - if rinfos.ReplicationStatus() == replication.Failed { + if replicationStatus == replication.Failed { eventName = event.ObjectReplicationFailed } newReplStatusInternal := rinfos.ReplicationStatusInternal()