Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-572

DB#authenticate fails due to read preference changes in MongoReplicaSetClient#checkout_reader

    XMLWordPrintable

Details

    Description

      If I try to configure a replicaset, I get this error with v1.8.4 (released to Rubygems yesterday):

      It appears that :reader_preferred is no longer a valid read preference (code is expecting a hash now), but is being passed on lib/mongo/db.rb:126

      /Users/asalomon/.rvm/gems/ruby-1.9.3-p385@mash/gems/mongo-1.8.4/lib/mongo/util/read_preference.rb:47:in `merge': can't convert Symbol into Hash (TypeError)
      from /Users/asalomon/.rvm/gems/ruby-1.9.3-p385@mash/gems/mongo-1.8.4/lib/mongo/util/read_preference.rb:47:in `read_pool'
      from /Users/asalomon/.rvm/gems/ruby-1.9.3-p385@mash/gems/mongo-1.8.4/lib/mongo/mongo_replica_set_client.rb:342:in `block in checkout_reader'
      from /Users/asalomon/.rvm/gems/ruby-1.9.3-p385@mash/gems/mongo-1.8.4/lib/mongo/mongo_replica_set_client.rb:326:in `checkout'
      from /Users/asalomon/.rvm/gems/ruby-1.9.3-p385@mash/gems/mongo-1.8.4/lib/mongo/mongo_replica_set_client.rb:341:in `checkout_reader'
      from /Users/asalomon/.rvm/gems/ruby-1.9.3-p385@mash/gems/mongo-1.8.4/lib/mongo/db.rb:126:in `authenticate'

      Attachments

        Activity

          People

            brandon.black@10gen.com Brandon Black
            asalomon@mylookout.com Ariel Salomon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: