ExportXMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Use Case

      As a... Mongodb user
      I want... a single source of truth in options validation
      So that... I can bring my database use to any driver and get the same outcome,
         ...and so that I can get the latest features without waiting for driver implementation

      User Experience

      The Node.js driver supports passing through all index options.

      Dependencies

      This was first raised as a request for 2d sphere index options support in mongosh, see MONGOSH-2152.

      Risks/Unknowns

      • What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
        • Index creation that previously succeeded may start to fail. The driver currently allowlists the index options, silently dropping unknown/invalid options before they hit the server. If the driver should drop this allowlist, operations that contained a mix of valid and invalid options (which were succeeding by selecting for only the valid options) would start being rejected by the server.

      Acceptance Criteria

      Implementation Requirements

      • Add a flag to the driver to enable a new behavior (default: off) that sends all options to the server for validation.
      • The new behavior is implemented by dropping the allowlist filter from the driver.
      • Schedule full removal of the allowlist from driver for version 8.
      • The following options are confirmed to work via the driver (and implicitly, by extension, mongosh)
        • finestIndexedLevel
        • coarsestIndexedLevel
        • maxCellsInCovering (TBD, see SERVER-50172)

      Testing Requirements

      • Unit tests:
        • invalid/unknown options are silently dropped when feature flag is set to off
        • invalid/unknown options are silently dropped when the feature flag is unset (default behavior: off)
        • invalid/unknown options remain when the feature flag is set to on
      • Integration tests
        • invalid/unknown options do not interfere with the otherwise successful creation of the index when feature flag is set to off
        • invalid/unknown options do not interfere with the otherwise successful creation of the index when feature flag is unset (default behavior: off)
        • invalid/unknown options experience an error from the server when feature flag is set to on 

      Documentation Requirements

      Follow Up Requirements

      • additional tickets to file, required releases, etc
        • File a ticket to remove the feature flag in the version 8 release of the Node.js driver.
      • if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward

            Assignee:
            Unassigned
            Reporter:
            TPM Jira Automations Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: