mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Avoid notification event for replicas (#11683)
Creating notification events for replica creation is not particularly useful to send as the notification event generated at source already includes replication completion events. For applications using replica cluster as failover, avoiding duplicate notifications for replica event will allow seamless failover.
This commit is contained in:
committed by
GitHub
parent
039f59b552
commit
690434514d
@@ -234,12 +234,16 @@ func extractReqParams(r *http.Request) map[string]string {
|
||||
cred := getReqAccessCred(r, region)
|
||||
|
||||
// Success.
|
||||
return map[string]string{
|
||||
m := map[string]string{
|
||||
"region": region,
|
||||
"accessKey": cred.AccessKey,
|
||||
"sourceIPAddress": handlers.GetSourceIP(r),
|
||||
// Add more fields here.
|
||||
}
|
||||
if _, ok := r.Header[xhttp.MinIOSourceReplicationRequest]; ok {
|
||||
m[xhttp.MinIOSourceReplicationRequest] = ""
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// Extract response elements to be sent with event notifiation.
|
||||
|
||||
Reference in New Issue
Block a user