When using DB.requestStart, reads are not guaranteed to use the same connection

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.8.0
    • Affects Version/s: None
    • Component/s: Cluster Management
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are a number of issues with DB.requestStart/requestDone:

      • If client reads from a primary or secondary, subsequent reads may use a different connection. Every read goes back to the pool for a new connection (which could potentially block or fail, depending on MongoOptions.maxWaitTime)
      • If client reads from a secondary (any, or tagged), there is no guarantee that subsequent reads will go to the same secondary
      • If client reads from a secondary (any, or tagged), and then writes, subsequent reads will go the primary regardless of the read preference

            Assignee:
            Jeffrey Yemin
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: