Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1499

Remove timeout check from server selection fast path

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: Server Selection
    • Security Level: Public
    • Labels:
      None

      Description

      In GODRIVER-1404, we introduced a server selection fast path that attempts to select a server once. If the initial selection fails, we call Subscribe and wait for new updates. The fast path still checks for ctx.Done and server selection timeout. We can remove this check because the fast path is arguably non-blocking and if the context has expired, it'll either be checked in the Subscribe path if initial selection fails or in WriteWireMessage before we send the command to the server. This basically makes it so we always attempt server selection once, regardless of the context/timeout.

        Attachments

          Activity

            People

            Assignee:
            divjot.arora Divjot Arora
            Reporter:
            divjot.arora Divjot Arora
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: