mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
separate lock from common grid to avoid epoll contention (#20180)
epoll contention on TCP causes latency build-up when we have high volume ingress. This PR is an attempt to relieve this pressure. upstream issue https://github.com/golang/go/issues/65064 It seems to be a deeper problem; haven't yet tried the fix provide in this issue, but however this change without changing the compiler helps. Of course, this is a workaround for now, hoping for a more comprehensive fix from Go runtime.
This commit is contained in:
@@ -1319,7 +1319,11 @@ func (c *Connection) handleConnectMux(ctx context.Context, m message, subID *sub
|
||||
handler = c.handlers.subStateless[*subID]
|
||||
}
|
||||
if handler == nil {
|
||||
gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: "Invalid Handler for type"}))
|
||||
msg := fmt.Sprintf("Invalid Handler for type: %v", m.Handler)
|
||||
if subID != nil {
|
||||
msg = fmt.Sprintf("Invalid Handler for type: %v", *subID)
|
||||
}
|
||||
gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: msg}))
|
||||
return
|
||||
}
|
||||
_, _ = c.inStream.LoadOrCompute(m.MuxID, func() *muxServer {
|
||||
@@ -1338,7 +1342,11 @@ func (c *Connection) handleConnectMux(ctx context.Context, m message, subID *sub
|
||||
handler = c.handlers.subStreams[*subID]
|
||||
}
|
||||
if handler == nil {
|
||||
gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: "Invalid Handler for type"}))
|
||||
msg := fmt.Sprintf("Invalid Handler for type: %v", m.Handler)
|
||||
if subID != nil {
|
||||
msg = fmt.Sprintf("Invalid Handler for type: %v", *subID)
|
||||
}
|
||||
gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: msg}))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1392,7 +1400,11 @@ func (c *Connection) handleRequest(ctx context.Context, m message, subID *subHan
|
||||
handler = c.handlers.subSingle[*subID]
|
||||
}
|
||||
if handler == nil {
|
||||
gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: "Invalid Handler for type"}))
|
||||
msg := fmt.Sprintf("Invalid Handler for type: %v", m.Handler)
|
||||
if subID != nil {
|
||||
msg = fmt.Sprintf("Invalid Handler for type: %v", *subID)
|
||||
}
|
||||
gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: msg}))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user