Ruby Driver
  1. Ruby Driver
  2. RUBY-547

Support readPreference in connection URIs

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor - P4 Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3
    • Component/s: Replica Set
    • Labels:
      None
    • Operating System:
      ALL
    • # Replies:
      4
    • Last comment by Customer:
      true

      Description

      According to the connection string documentation, connection URIs should support '?readPreference=PREF' to specify a read preference when connecting to a replica set, but mongo-ruby-driver does not seem to.

      http://docs.mongodb.org/manual/reference/connection-string/

        Activity

        Hide
        Brandon Black (Inactive)
        added a comment -

        The examples there show it, but it's not actually a required part of the spec. It's considered an "extra option" in the connection string specification.

        That said, we can and should support it. Thanks for opening the ticket, we'll get it out soon.

        Show
        Brandon Black (Inactive)
        added a comment - The examples there show it, but it's not actually a required part of the spec. It's considered an "extra option" in the connection string specification. That said, we can and should support it. Thanks for opening the ticket, we'll get it out soon.
        Hide
        auto (Inactive)
        added a comment -

        Author:

        {u'date': u'2013-02-10T11:00:56Z', u'name': u'Durran Jordan', u'email': u'durran@gmail.com'}

        Message: Support read preferences in URI parser.

        This will parse and add read preference options from the uri parser and
        add them to the connection options when asking for them. This makes the
        assumption that we must be in a replica set to set the options, and will
        override the slaveOk flag if it is also present.

        The fix for RUBY-541 will change this slightly to assume it can be set
        for replica sets and sharded clients.

        [ RUBY-547 ]
        Branch: RUBY-547-support-read-preferences-in-uri
        https://github.com/mongodb/mongo-ruby-driver/commit/d79cd611d0e89cf9bff73bf7cb40b0e42754c27a

        Show
        auto (Inactive)
        added a comment - Author: {u'date': u'2013-02-10T11:00:56Z', u'name': u'Durran Jordan', u'email': u'durran@gmail.com'} Message: Support read preferences in URI parser. This will parse and add read preference options from the uri parser and add them to the connection options when asking for them. This makes the assumption that we must be in a replica set to set the options, and will override the slaveOk flag if it is also present. The fix for RUBY-541 will change this slightly to assume it can be set for replica sets and sharded clients. [ RUBY-547 ] Branch: RUBY-547 -support-read-preferences-in-uri https://github.com/mongodb/mongo-ruby-driver/commit/d79cd611d0e89cf9bff73bf7cb40b0e42754c27a
        Hide
        auto (Inactive)
        added a comment -

        Author:

        {u'date': u'2013-02-10T11:00:56Z', u'name': u'Durran Jordan', u'email': u'durran@gmail.com'}

        Message: Support read preferences in URI parser.

        This will parse and add read preference options from the uri parser and
        add them to the connection options when asking for them. This makes the
        assumption that we must be in a replica set to set the options, and will
        override the slaveOk flag if it is also present.

        The fix for RUBY-541 will change this slightly to assume it can be set
        for replica sets and sharded clients.

        [ RUBY-547 ]
        Branch: RUBY-547-support-read-preferences-in-uri
        https://github.com/mongodb/mongo-ruby-driver/commit/56c2724e2cebdad27b710dd78e78b934a14bb3b3

        Show
        auto (Inactive)
        added a comment - Author: {u'date': u'2013-02-10T11:00:56Z', u'name': u'Durran Jordan', u'email': u'durran@gmail.com'} Message: Support read preferences in URI parser. This will parse and add read preference options from the uri parser and add them to the connection options when asking for them. This makes the assumption that we must be in a replica set to set the options, and will override the slaveOk flag if it is also present. The fix for RUBY-541 will change this slightly to assume it can be set for replica sets and sharded clients. [ RUBY-547 ] Branch: RUBY-547 -support-read-preferences-in-uri https://github.com/mongodb/mongo-ruby-driver/commit/56c2724e2cebdad27b710dd78e78b934a14bb3b3
        Hide
        auto (Inactive)
        added a comment -

        Author:

        {u'date': u'2013-02-10T11:00:56Z', u'name': u'Durran Jordan', u'email': u'durran@gmail.com'}

        Message: Support read preferences in URI parser.

        This will parse and add read preference options from the uri parser and
        add them to the connection options when asking for them. This makes the
        assumption that we must be in a replica set to set the options, and will
        override the slaveOk flag if it is also present.

        The fix for RUBY-541 will change this slightly to assume it can be set
        for replica sets and sharded clients.

        [ RUBY-547 ]
        Branch: master
        https://github.com/mongodb/mongo-ruby-driver/commit/56c2724e2cebdad27b710dd78e78b934a14bb3b3

        Show
        auto (Inactive)
        added a comment - Author: {u'date': u'2013-02-10T11:00:56Z', u'name': u'Durran Jordan', u'email': u'durran@gmail.com'} Message: Support read preferences in URI parser. This will parse and add read preference options from the uri parser and add them to the connection options when asking for them. This makes the assumption that we must be in a replica set to set the options, and will override the slaveOk flag if it is also present. The fix for RUBY-541 will change this slightly to assume it can be set for replica sets and sharded clients. [ RUBY-547 ] Branch: master https://github.com/mongodb/mongo-ruby-driver/commit/56c2724e2cebdad27b710dd78e78b934a14bb3b3

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              2 years, 3 weeks, 2 days ago
              Date of 1st Reply: