node-mongodb-native
node-mongodb-native copied to clipboard
fix(NODE-6377): remove noResponse option
Description
Now that unacknowledged writes are supported through writeConcern.w = 0, remove the buggy noResponse option internally and in public APIs.
What is changing?
- Remove noResponse from public
CommandOperationOptionsAPI - Update
client.close()andRunAdminCommandOperationto usewriteConcerninstead
Is there new documentation needed for these changes?
None, except removing the option from the Public API.
What is the motivation for this change?
NODE-6060.
Release Highlight
Remove CommandOperationOptions.noResponse option
Setting the noResponse option on CommandOperationOptions would result in indeterminate socket behavior leading to either silent or thrown errors on any following operations. Since this option is broken and causes bugs, we're removing it to call attention to any code that may have been using it inadvertently.
In order to correctly request that the driver recieves 'no response' from the server (usually to perform an unacknowledged write) setting the WriteConcern.w property to 0 is the recommended migration.
Double check the following
- [ ] Ran
npm run check:lintscript - [ ] Self-review completed using the steps outlined here
- [ ] PR title follows the correct format:
type(NODE-xxxx)[!]: description- Example:
feat(NODE-1234)!: rewriting everything in coffeescript
- Example:
- [ ] Changes are covered by tests
- [ ] New TODOs have a related JIRA ticket