mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Honor connection pooling while tracing (#7979)
This PR fixes relying on r.Context().Done() by setting ``` Connection: "close" ``` HTTP Header, this has detrimental issues for client side connection pooling. Since this header explicitly tells clients to turn-off connection pooling. This causing pro-active connections to be closed leaving many conn's in TIME_WAIT state. This can be observed with `mc admin trace -a` when running distributed setup. This PR also fixes tracing filtering issue when bucket names have `minio` as prefixes, trace was erroneously ignoring them.
This commit is contained in:
committed by
kannappanr
parent
cbd02c58be
commit
123cccaed1
@@ -394,20 +394,3 @@ func getHostName(r *http.Request) (hostName string) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func isHTTPStatusOK(statusCode int) bool {
|
||||
// List of success status.
|
||||
var successStatus = []int{
|
||||
http.StatusOK,
|
||||
http.StatusCreated,
|
||||
http.StatusAccepted,
|
||||
http.StatusNoContent,
|
||||
http.StatusPartialContent,
|
||||
}
|
||||
for _, okstatus := range successStatus {
|
||||
if statusCode == okstatus {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user