do not count context canceled as timeout errors (#18975)

This commit is contained in:
Harshavardhana 2024-02-05 18:16:13 -08:00 committed by GitHub
parent 7aa00bff89
commit 6f16d1cb2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -745,10 +745,9 @@ func (p *xlStorageDiskIDCheck) updateStorageMetrics(s storageMetric, paths ...st
errFaultyDisk,
errFaultyRemoteDisk,
context.DeadlineExceeded,
context.Canceled,
}...) {
p.totalErrsAvailability.Add(1)
if errors.Is(err, context.DeadlineExceeded) || errors.Is(err, context.Canceled) {
if errors.Is(err, context.DeadlineExceeded) {
p.totalErrsTimeout.Add(1)
}
}