Are the reconnectWait and retries options of replSet implemented?

13 views
Skip to first unread message

Pedro Ballesteros

unread,
Mar 18, 2014, 10:16:49 AM3/18/14
to node-mong...@googlegroups.com
Hi,

We are testing the working of a node.js application against a mongodb replica set and its behaviour when we shutdown the primary member of the replica set.

We have verified that when we shutdown the primary member, our application begins to queue the writing operations until a new primary is available, but sometimes we get a connection error [Error: connection closed]. 

When you shutdown the primary and immediately send a write operation, the driver returns a connection closed error.

In the documentation:

You can see the default values of the auto connection mechanisms of replica sets:
replSet.reconnectWait : 1000
replSet.retries : 30

So it is supposed that if you shutdown the primary member and get and connection closed error in the operation in progress, the driver should retry the operation again up to 30 times. 

But that is not the behaviour we are getting, the mongodb driver never retries the failed operation.

We don't find where that options are used in the source code of the driver. We found where the options are configured, but it seems that the values are never used.

So, does anyone knows if that options are implemented and are really used?

BR,
    Pedro
Reply all
Reply to author
Forward
0 new messages