Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75589

Make `mirrorResponseCallback` handle cancellation at shutdown

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • Internal Code
    • None
    • Fully Compatible
    • Service Arch 2023-04-17, Service Arch 2023-05-01
    • 20

    Description

      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.

      Attachments

        Activity

          People

            jason.chan@mongodb.com Jason Chan
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: