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

XMLWordPrintableJSON

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

      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:
              Kyle Banker (Inactive)
              Reporter:
              Jonathan Tron
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: