New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconnect to mongo indefinitely. #7880
Conversation
A fix for #7822 It seems the driver now always autoReconnects, but only for 30s. To get the old (sensible) behavior of endlessly reconnecting, we set `reconnectTries` to 0.
If we do a point release, I should rename this branch to If not, we should cherry-pick this commit to |
3dc9fa5
to
ce2c284
Compare
Published (Due to vagaries in version ordering, you'll need to put |
Can you add a note about this to |
Is this in a released |
Yes, I've published it as |
Setting mongoOptions.server.auto_reconnect was removed by #7880 via commit 0ffb9ac, though it seems the Server options still respect autoReconnect, even in version 2.2 of the driver: http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html That said, having inspected the code of the `mongodb` package, I do not believe this change is really critical, since the default value for autoReconnect appears to be true. More importantly, I can't find any support in the code of the `mongodb` npm package or its dependencies for the claim that setting mongoOptions.server.reconnectTries to 0 is the same as making it infinite, so this commit sets it to Infinity.
* Reconnect to mongo indefinitely. A fix for #7822 It seems the driver now always autoReconnects, but only for 30s. To get the old (sensible) behavior of endlessly reconnecting, we set `reconnectTries` to 0. * Releasing an rc of mongo package
Setting mongoOptions.server.auto_reconnect was removed by #7880 via commit 0ffb9ac, though it seems the Server options still respect autoReconnect, even in version 2.2 of the driver: http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html That said, having inspected the code of the `mongodb` package, I do not believe this change is really critical, since the default value for autoReconnect appears to be true. More importantly, I can't find any support in the code of the `mongodb` npm package or its dependencies for the claim that setting mongoOptions.server.reconnectTries to 0 is the same as making it infinite, so this commit sets it to Infinity.
I'm not sure if we want to do a point release for this one, or just release a new version of the
mongo
package and sweep it up in the next release.AFAICT, fixes #7822, and possibly various other mongo-related bugs I've been hearing about.