Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-498

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0
    • Affects Version/s: None
    • Component/s: Cluster Management
    • 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:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: