mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -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
@@ -499,10 +499,12 @@ func (client *peerRESTClient) doTrace(traceCh chan interface{}, doneCh chan stru
|
||||
if err = dec.Decode(&info); err != nil {
|
||||
return
|
||||
}
|
||||
select {
|
||||
case traceCh <- info:
|
||||
default:
|
||||
// Do not block on slow receivers.
|
||||
if len(info.NodeName) > 0 {
|
||||
select {
|
||||
case traceCh <- info:
|
||||
default:
|
||||
// Do not block on slow receivers.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user