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

Mongo::Grid never creates the needed index when using replica set

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.0
    • Affects Version/s: 1.4.0, 1.4.1
    • Component/s: None
    • Major Change

      In version >=1.4.0, Mongo::Grid#initialize checks for db.connection.slave_ok? which always returns false in Mongo::ReplSetConnection, thus on a new db it's never issuing the @chunks.create_index([['files_id', Mongo::ASCENDING], ['n', Mongo::ASCENDING]], :unique => true).

      In previous versions, Mongo::ReplSetConnection#slave_ok? was based on the :read_secondary option, even if hackish it allowed to use Mongo::Grid with replica set.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            jonathantron Jonathan Tron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: