Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4184

AggregateOperation should not throw when explain + writeConcern is specified

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      The AggregateOperation constructor has logic to throw an error if an aggregation is constructed with explain and writeConcern set (https://github.com/mongodb/node-mongodb-native/blob/5b3d01b824587dfa75f36ef9e55f6559d5fc5fe9/src/operations/aggregate.ts#L71).  Instead, the node driver should not throw an error and rely on the server to report the error where appropriate.

      User Impact

      Users will see errors in the same scenarios, but the error will be generated by the server and not the driver.  This will change the error from a MongoInvalidArgumentError to a MongoServerError.

      Dependencies

      Unknowns

      Acceptance Criteria

      • Don't send writeConcern when explain are both used.

      Implementation Requirements

      Testing Requirements

      •  

      Documentation Requirements

      • n/a

      Follow Up Requirements

      • n/a

            Assignee:
            Unassigned Unassigned
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: