fix: read atomic variable in clientDevNull round trip time (#17955)

This commit is contained in:
yangw 2023-08-31 23:31:01 +08:00 committed by GitHub
parent 9458485e43
commit b13fcaf666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1185,7 +1185,7 @@ func (a adminAPIHandlers) ClientDevNullExtraTime(w http.ResponseWriter, r *http.
}
enc := json.NewEncoder(w)
if err := enc.Encode(madmin.ClientPerfExtraTime{TimeSpent: globalLastClientPerfExtraTime}); err != nil {
if err := enc.Encode(madmin.ClientPerfExtraTime{TimeSpent: atomic.LoadInt64(&globalLastClientPerfExtraTime)}); err != nil {
return
}
}