-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Networking & Observability
-
N&O 2026-07-20, N&O 2026-08-03
-
None
-
None
-
None
-
None
-
None
-
None
-
None
NITL converts SocketException to HostUnreachable, apparently due to legacy sharding SDAM logic according to the comment there:
// The TransportLayer has, for historical reasons returned SocketException for network
// errors, but sharding assumes HostUnreachable on network errors.
However, this is no longer true. Remote command targeting / SDAM error handling uses error categories such as NetworkError (which HostUnreachable belongs to) to make these changes:
- https://github.com/mongodb/mongo/blob/e204c648682f23e15c2a44218615fc2074f04fd2/src/mongo/client/remote_command_targeter.h#L89
- https://github.com/mongodb/mongo/blob/e204c648682f23e15c2a44218615fc2074f04fd2/src/mongo/client/streamable_replica_set_monitor_error_handler.cpp#L87-L120
We should remove this conversion logic as it is no longer needed and can obfuscate the intended error codes returned from the TransportLayer.
- is related to
-
SERVER-130338 Search index network error conversion is too specific
-
- Backlog
-