replication: fix audit log reporting (#17222)

This commit is contained in:
Poorna 2023-05-16 15:35:08 -07:00 committed by GitHub
parent aaf1abc993
commit 2131046427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()