-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
Service Arch 2023-04-17, Service Arch 2023-05-01
-
20
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
The mirroring sub-system has a test-only feature to verify completion of mirrored operations, and terminate the process if a mirrored read fails to execute:
auto mirrorResponseCallback = [host](auto& args) { if (MONGO_likely(!mirrorMaestroExpectsResponse.shouldFail())) { // If we don't expect responses, then there is nothing to do here return; } ... if (ErrorCodes::isRetriableError(args.response.status)) { ... } else if (!args.response.isOK()) { LOGV2_FATAL(4717301, "Received mirroring response with a non-okay status", "error"_attr = args.response); } };
This logic doesn't handle cancellations at shutdown. We should make mirrorResponseCallback aware of the state of the mirroring subsystem and treat cancellations differently (e.g., logging at "INFO" level). Also, we should have the log statement include the HostAndPort of the target.