node-mongodb-native icon indicating copy to clipboard operation
node-mongodb-native copied to clipboard

fix(NODE-6377): remove noResponse option

Open aditi-khare-mongoDB opened this issue 1 year ago • 0 comments

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 CommandOperationOptions API
  • Update client.close() and RunAdminCommandOperation to use writeConcern instead
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:lint script
  • [ ] 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
  • [ ] Changes are covered by tests
  • [ ] New TODOs have a related JIRA ticket

aditi-khare-mongoDB avatar Sep 16 '24 15:09 aditi-khare-mongoDB