Slow query log print wrong error if the error has been translated

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Networking & Observability
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When the mongos receives from a shard either a NonPrimaryError or a ShutdownError, that error is translated before returning a response to the external client. For example, the error InterruptedDueToReplStateChange is translated to a HostUnreachable error to clarify that the router hasn't been interrupted due to a replica state change.

      However, the Slow query log printed by the mongos is printing the original error instead of the final one. This is very misleading when it comes to debug failures on tests since tests may fail with a different error than the one reported by the server log.

        1. repro.js
          1 kB
        2. repro.patch
          1 kB

              Assignee:
              Unassigned
              Reporter:
              Silvia Surroca
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: