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

For direct connection, ignore read preference when selecting a server

    XMLWordPrintableJSON

Details

    Description

      The 2.12 release candidate contains an inadvertent change to the behavior of a direct connection (ones where only a single server address is provided, rather than a List<ServerAddress>) to a member of a replica set: it takes in to consideration the read preference when determining if an operation will be sent to the server that its directly connected to.

      This, if the read preference is secondary and its directly connected to a primary, the operation will fail. Similarly, if the read preference is primary and its directly connected to a secondary, the operation will fail.

      Though there a a good argument to be made that it's the correct behavior, this change should be backed out, as it's inconsistent with the current behavior of most other drivers.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: