Skip to content
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

docs(migrating_to_6): added info about removal of reconnectTries and reconnectInterval options #13083

Merged
merged 2 commits into from
Feb 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/migrating_to_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ If you're still on Mongoose 4.x, please read the [Mongoose 4.x to 5.x migration
* [No default model for `Query.prototype.populate()`](#no-default-model-for-query-prototype-populate)
* [`toObject()` and `toJSON()` Use Nested Schema `minimize`](#toobject-and-tojson-use-nested-schema-minimize)
* [TypeScript changes](#typescript-changes)
* [Removed `reconnectTries` and `reconnectInterval` options](#removed-reconnecttries-and-reconnectinterval-options)

<h3 id="version-requirements"><a href="#version-requirements">Version Requirements</a></h3>

Expand Down Expand Up @@ -530,3 +531,10 @@ schema.virtual('myVirtual').get(function() {
this.name; // string
});
```

<h3 id="removed-reconnecttries-and-reconnectinterval-options"><a href="#removed-reconnecttries-and-reconnectinterval-options">Removed <code>reconnectTries</code> and <code>reconnectInterval</code> options</a></h3>

The `reconnectTries` and `reconnectInterval` options have been removed since they are no longer necessary.

The MongoDB node driver will always attempt to retry any operation for up to `serverSelectionTimeoutMS`, even if MongoDB is down for a long period of time.
So, it will never run out of retries or try to reconnect to MongoDB.