-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 4.2.1
-
Component/s: None
What problem are you facing?
On mongodb@3 we used the "readPreferenceTags" set using th options param of the MongoClient. It was an array: ex:
MongoClient( uri, { "readPreferenceTags" : [{"dc" : "irl.amz"}]})
After updating the driver to mongodv@4.2.1, tags are processed correctly.
What driver and relevant dependency versions are you using?
mongodb@4.2.1
Steps to reproduce?
await (new MongoClient( URI, { readPreference : "nearest", readPreferenceTags : [{"dc":"irl.amz"}] } ).connect());
Put a breakpoint in connection_string.js at line 790
Observe that the readPreferenceTag array is populated with an empty object: {}.
That happens because the transform function gets the tags as an Array of Array of objects, and not Array of objects, as it should.
- depends on
-
NODE-3814 Investigate NODE-3813 - MongoClient readPreferenceTags Options are not processed correctly
- Closed