Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-89489

Internal change stream stages should not be serialized for query stats

    • Query Integration
    • Fully Compatible
    • v8.0, v7.0, v6.0
    • 0

      Recently a few issues have come up related to internal change stream stages like DocumentSourceChangeStreamEnsureResumeTokenPresent.

      My understanding is that users typically use the $changeStream which is then expanded internally to various internal stages. We should probably just put a single top-level $changeStream node into query stats, but not serialize any of the internal stages. This would both solve existing issues and might make query stats easier to work with, since internal change stream details would not be exposed.

      With this ticket the query shape for changeStreams will change. We will not include any of the internal change stream stages, but instead closely match the user specified spec. We will have a single stage $changeStream that will only include fields the user could pass in. The fields will contain the user specified option, or the default option if there is one. If there is no default option and the user didn't specify the field that field won't exist in the query shape. Therefore, this ticket will completely change the query shape of $changeStream stage.

            Assignee:
            gil.alon@mongodb.com Gil Alon
            Reporter:
            chris.wolff@mongodb.com Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: