-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Networking & Observability
-
N&O 2025-03-03, N&O 2025-03-17, N&O 2025-03-31, N&O 2025-04-14, N&O 2025-04-28, N&O 2025-05-12
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
When canceling a session that is currently being polled by the baton, the error that the networking operation will receive is the rather unhelpful "Baton wait canceled", with no further context. NetworkInterfaceTL will attach more context to it later before returning it to the TaskExecutor, but the ConnectionPool doesn't receive that context. As a result, the log message it emits can be confusing. We should ensure the connection closure log message also includes the cancellation context that NetworkInterfaceTL has, if any.
e.g. here's an example of an existing log message
{"t":{"$date":"2025-02-10T22:02:03.609+00:00"},"s":"I", "c":"CONNPOOL", "id":22566, "ctx":"TaskExecutorPool-0","msg":"Ending connection due to bad connection status","attr":{"hostAndPort":"localhost:27017","error":"CallbackCanceled: Baton wait canceled","numOpenConns":368}}