ExportXMLWordPrintableJSON

    • 2
    • 1
    • Not Needed
    • None
    • 0.5
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... driver user
      I want... important errors to be surfaced from dropIndexes
      So that... I am alerted if something unexpected happens while using this API

      https://github.com/mongodb/specifications/blob/master/source/index-management/index-management.md#namespacenotfound-errors

      User Experience

      • What is the desired/expected outcome for the user once this ticket is implemented?
        • If the operation succeeds, resolve true. If the operation fails due to name space not found, resolve false. If the operation fails due to any other error, throw the error (reject).
      • If bug: What is the number of impacted customers? How severe is the impact? Is anyone blocked or broken?
        • The current behavior likely doesn't have much impact on existing users, since the manual only calls out the following edge cases as potential errors from this API:

          Starting in MongoDB 6.0, dropIndexes raises an error if you attempt to use it to remove the last remaining shard key compatible index. Passing "*" to dropIndexes drops all indexes except the _id index and the last remaining shard key compatible index, if one exists.

          Starting in MongoDB 5.2, you can use dropIndexes to drop existing indexes on the same collection even if there is a build in progress on another index. In earlier versions, attempting to drop a different index during an in-progress index build results in a BackgroundOperationInProgressForNamespace error.

          However, it's still better not to suppress errors, since if users see unexpected behavior, it's a better experience to be able to tell why from the logs, rather than swallow the error completely, with only "false" ("it failed") to go on.

      Dependencies

      • upstream and/or downstream requirements and timelines to bear in mind

      Risks/Unknowns

      • Users could be relying on valid behaviour today, wherein an error is intended to not be surfaced. This change could be breaking instead of fixing in this case.

      Acceptance Criteria

      Implementation Requirements

      • The driver should only squash name space not found errors and throw all others in dropIndexes; when the name space not found error is squashed, the API should (continue to) return false

      Testing Requirements

      • Tests should be added to ensure the driver throws

      Documentation Requirements

      • None

      Follow Up Requirements

            Assignee:
            Johnathan Martell
            Reporter:
            Neal Beeken
            Sergey Zelenov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: