-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.3.0
-
Component/s: Core
-
None
-
(copied to CRM)
-
Empty show more show less
Version 3.3.0 of the Node driver appears to have a regression where readPreference is not adhered to.
Specifying readPreference=secondary in the connection string with version 3.2.7 results in the find() operation being executed on a secondary node, however the same code with 3.3.0 sees the operation executed on the PRIMARY node.
Connection string and options:
var url = "mongodb://JM-METABOX:27001,JM-METABOX:27002,JM-METABOX:27003/?replicaSet=rs&readPreference=secondary"; const client = new MongoClient(url, { useUnifiedTopology: true, useNewUrlParser: true, monitorCommands: true });