-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.
- related to
-
SERVER-89578 Distinguish between cluster vs db vs collection level change stream in $queryStats
- Backlog
-
SERVER-91274 Add change stream type to query shape
- Closed