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

XMLWordPrintableJSON

    • 2
    • None
    • 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

      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
            None
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: