-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 8.3.11, 7.0.45
-
Component/s: None
-
None
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
aggregate opts into kill-on-disconnect (handleMarkKillOnClientDisconnect),
and over plain TCP an aggregate whose client has disconnected is killed with
ClientDisconnect within about a second. Over TLS, if the client closes cleanly
(sends a `close_notify` alert, then closes the socket), the operation is never
detected as disconnected and runs to completion. The Go driver always closes
this way, because Go's crypto/tls sends close_notify on Close().
The likely cause is in
[{*}AsioSession::isConnected(){*}](https://github.com/mongodb/mongo/blob/r7.0.14/src/mongo/transport/asio/asio_session_impl.cpp).
It treats a socket as connected if one byte can be peeked, so the unread
close_notify record sitting before the FIN makes a closed peer look connected.
On Atlas (7.0.45, TLS) this left aggregates from timed-out Go clients running on
secondaries for 31 and 60 minutes, and client retries piled up more of them.
- is fixed by
-
SERVER-131398 Consider adding POLLRDHUP to CommonAsioSession::isConnected()
-
- Closed
-