-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: MongoDB 3.4
-
None
-
(copied to CRM)
-
Empty show more show less
When trying to utilize a readPreference of Secondary on a replica set, the Node driver has a chance of intermittently taking forever to run.
MongoDB: 3.4.6
Node: 6.10.3
MongoDB Node Driver: 2.2.30
I have attached my topology.js that I used for testing as well as the logs from the runs to this ticket.
I set up a 3.4.6 PSS replica set on my local computer with the ports of 27017, 27018, and 27019. I used the instructions in the Node Quick Start guide to install the MongoDB Node Driver. In order to get increased logging, I utilized the "simple code example" for Topology Monitoring as the basis for my application. The only substantive changes were:
1. An adjusted connection string.
2. Timestamp logging to get an idea of how fast the application runs.
3. A findOne() command against a non-existent collection.
Between each test, the only thing I changed was the connection string in two different ways:
1. I changed the name of the hosts. They were either "localhost" or the FQDN of "Hatcher.local". Some runs had only the first hostname as the FQDN with the rest being localhost.
2. I changed the order of the hosts. The Primary was either the first node listed in the connection string or the last node.
Hostname | Order | Approx. Time | Logs |
---|---|---|---|
localhost (all) | PSS | 13ms | localhost_Primary.log |
localhost (all) | SSP | 14ms | localhost_Secondary.log |
FQDN (first) | PSS | 10,016ms | hatcher_Primary.log |
FQDN (first) | SSP | 9ms | hatcher_Secondary.log |
FQDN (all) | PSS | canceled operation after 20 minutes | hatcherall_Primary.log |
FQDN (all) | SSP | 7ms | hatcherall_Secondary.log |