-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Diagnostics
-
Service Arch 2022-06-13, Service Arch 2022-06-27, Service Arch 2022-07-25, Service Arch 2022-08-08, Service Arch 2022-08-22, Service Arch 2022-09-19, Service Arch 2022-10-03
-
(copied to CRM)
Sending the response for an operation to the client is done after we finish timing the operation, so if there is a delay due to network congestion this does not show up in logged slow queries nor in active connections, making it difficult to diagnose.
Some suggested improvements:
- Move the point at which an operation is considered completed until after the send() for the response has completed, so that that time is included in the slow query logging and the connection is considered active until that point. This may be a substantial code change, and it may also have downstream effects on log consumers since it will generally result in more and longer logged slow queries, so one or both of the following may be preferrable.
- Separately time the interval from completion of the query to the point where the send() has completed, and log it if it exceeds a threshold (e.g. slowms).
- Introduce a new connection state, say "transmitting", that a connection is in from the time the operation completes until the send() has completed, and report the number of connections in that state in serverStatus.connections.
- is related to
-
SERVER-63883 Report operation latency from receiving request to sending response
- Backlog