remove unnecessary logging and move to log once (#10798)

the current master logs way too much when a node
is down, instead log once and move on.
This commit is contained in:
Harshavardhana
2020-10-30 14:55:50 -07:00
committed by GitHub
parent 02cfa774be
commit 5e5cdc581d
5 changed files with 39 additions and 11 deletions

View File

@@ -27,8 +27,6 @@ import (
"sync/atomic"
"time"
"github.com/minio/minio/cmd/logger"
xhttp "github.com/minio/minio/cmd/http"
xnet "github.com/minio/minio/pkg/net"
)
@@ -119,7 +117,6 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod
resp, err := c.httpClient.Do(req)
if err != nil {
if xnet.IsNetworkOrHostDown(err, c.ExpectTimeouts) {
logger.LogIf(ctx, err, "marking disk offline")
c.MarkOffline()
}
return nil, &NetworkError{err}
@@ -149,7 +146,6 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod
b, err := ioutil.ReadAll(io.LimitReader(resp.Body, c.MaxErrResponseSize))
if err != nil {
if xnet.IsNetworkOrHostDown(err, c.ExpectTimeouts) {
logger.LogIf(ctx, err, "marking disk offline")
c.MarkOffline()
}
return nil, err