Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10453

Make DBClientReplicaSet::connect always return true

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.2
    • Affects Version/s: 2.5.1
    • Component/s: Internal Client
    • Labels:
      None

      History:

      Version 1:
      Connect used to only check connections to the primary so if there is no primary up, it will fail. This in effect, means that clients who only wants to talk to secondaries will fail even if they are available.

      Version 2:
      Connect is changed to return true if any of the node is ok based on the information from last refresh (this can be at max 10 sec old). This can be problematic if the node information is not refreshed periodically enough. Note: refresh can be triggered by other means, like when another DBClientReplicaSet tries to do queries in certain conditions.

      Proposal:
      Connect always returns true. All the operations for DBClientReplicaSet makes the necessary preparations for talking to the desired node lazily so there is currently no advantage of using connect. In fact, the current implementation of connect is purely a read only operation. Furthermore, even if we have a very sophisticated connect method, errors can happen right before the client calls query/insert, so I doesn't buy us very much.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: