Do not silently filter out $changeStream stage options when building a change stream cursor via the watch() API

XMLWordPrintableJSON

    • 2
    • Not Needed
    • 🔵 Done
    • 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
    • None
    • None
    • None
    • None
    • None
    • None

      When a change stream's stage options are being validated, any option key not present in the CHANGE_STREAM_OPTIONS const is being silently discarded.

      There are situations where undocumented command options may exist, and in these cases as the `watch` API would not be aware of them (ChangeStreamOptions are documented in the spec) the API should either WARN or throw.

      This would be a breaking change

      AC

      • Remove the logic to filter out user-provided options in CHANGE_STREAM_OPTIONS and allow pass-through of the user-provided options to the server
      • Add tests for the pass through (use an unknown option and let the server error)
      • Release note

            Assignee:
            Durran Jordan
            Reporter:
            Alex Bevilacqua
            Sergey Zelenov
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: