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

Don't use "background reads" when the CSOT doesn't send "maxTimeMS"

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 1.15.0
    • Component/s: None
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Context

      Starting in v1.15.0, the Go Driver reads server responses in the background (for up to 1 second) after an operation times out to reduce the chances that the connection needs to be closed. However, Go Driver v1.15.0 doesn't send maxTimeMS for Find or Aggregate operations (or for iterating a cursor with getMore). We shouldn't try to read responses in the background if we didn't send maxTimeMS because we may end up tying up many connections in the background for 1 second.

      Definition of done

      • Don't set awaitingResponse=true if we didn't set maxTimeMS on the server command.

      Pitfalls

      • This may cause more connections to be closed, although it's likely connections are already being closed in the impacted cases.

            Assignee:
            matt.dale@mongodb.com Matt Dale
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: