-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
Service Arch 2022-07-11
-
49
The current implementation for DBClientConnection::call could absorb exceptions and return a boolean to indicate failures:
auto maybeThrow = [&](const auto& errStatus) { if (assertOk) uassertStatusOKWithContext(errStatus, str::stream() << "dbclient error communicating with server " << getServerAddress()); return false; };
This essentially hides the real cause of failure and makes root-causing failures difficult. We should make such failures visible by either:
- Changing call to always return a Status.
- Changing call to always throw exceptions.
Looking at the code, there are not many invocations of call, and we should be able to change the interface to always throw with few changes to the call-sites.
- split to
-
SERVER-65997 Add diagnostics to `DBClientConnection::call`
- Closed