Sharding host targeting logic should use the remaining time from the OperationContext as a timeout

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Service Arch 2019-02-11
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently RemoteCommandTargeter::selectFindHostMaxWaitTime() will always return a default timeout:

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/remote_command_targeter.cpp#L48-L49

      This is the timeout which we use when targeting a particular host within a shard. Instead of using a default, we should attach a timeout to the OperationContext (potentially the maxTimeMS value) and use this as the host targeting timeout.

            Assignee:
            Mathias Stearn
            Reporter:
            David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: