Details
-
Bug
-
Status: Closed
-
Minor - P4
-
Resolution: Gone away
-
2.4.3
-
None
-
MRI 2.3
Description
The rdoc for Collection#find has
@option opts [:primary, :secondary] :read The default read preference for queries
|
# initiates from this connection object. If +:secondary+ is chosen, reads will be sent
|
# to one of the closest available secondary nodes. If a secondary node cannot be located, the
|
# read will be sent to the primary. If this option is left unspecified, the value of the read
|
# preference for this Collection object will be used.
|
|
However the code seems to expect that a server selector is passed, as snippets like
database['some_collection'].find({},{read: {mode: :secondary}}).first
|
raises the following error
NoMethodError: undefined method `select_server' for {"mode"=>:secondary}:BSON::Document
|