-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
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.