Skip to content

Commit

Permalink
add 'failed' to warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Jun 28, 2022
1 parent 2fc6eb6 commit cd1d4ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions store/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,15 +855,15 @@ func requestPDForOneHost(host, apiName, method, uri string, body io.Reader, res
logutil.BgLogger().Debug("RequestPD URL", zap.String("url", urlVar))
req, err := http.NewRequest(method, urlVar, body)
if err != nil {
logutil.BgLogger().Warn("requestPDForOneHost new request",
logutil.BgLogger().Warn("requestPDForOneHost new request failed",
zap.String("url", urlVar), zap.Error(err))
return errors.Trace(err)
}
start := time.Now()
resp, err := util.InternalHTTPClient().Do(req)
if err != nil {
metrics.PDAPIRequestCounter.WithLabelValues(apiName, "network error").Inc()
logutil.BgLogger().Warn("requestPDForOneHost do request",
logutil.BgLogger().Warn("requestPDForOneHost do request failed",
zap.String("url", urlVar), zap.Error(err))
return errors.Trace(err)
}
Expand All @@ -872,7 +872,7 @@ func requestPDForOneHost(host, apiName, method, uri string, body io.Reader, res
defer func() {
err = resp.Body.Close()
if err != nil {
logutil.BgLogger().Warn("requestPDForOneHost close body",
logutil.BgLogger().Warn("requestPDForOneHost close body failed",
zap.String("url", urlVar), zap.Error(err))
}
}()
Expand Down

0 comments on commit cd1d4ac

Please sign in to comment.