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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0, 1.4.1
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Backwards Compatibility:
      Major Change

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: