-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Query Integration
-
Fully Compatible
-
ALL
-
v8.3
-
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When a $lookup targets a sharded timeseries view, the subpipeline may be dispatched to a different shard for view resolution (e.g. after movePrimary relocates system.views). The flag is per-node/in-memory only - if its local collection object never received extended range inserts, that shard can throw CommandOnShardedViewNotSupportedOnMongod with a ResolvedView that carries timeseriesUsesExtendedRange=false
The executing shard then rebuilds the subpipeline using this incorrect flag, enabling the BoundedSorter optimization. When the actual data contains pre-epoch or post-2038 dates, the sorter throws error 6369910.
To fix this:
In LookUpStage::buildPipelineFromViewDefinition, after creating the new ExpressionContext from the ResolvedView, check the local shard's Collection object for the buckets namespace. If it has requiresTimeseriesExtendedRangeSupport=true, propagate that to the ExpressionContext, overriding the incorrect value from the remote shard's ResolvedView.
- related to
-
SERVER-122035 Clean up legacy viewful timeseries code in LookupStage::buildPipelineFromViewDefinition()
-
- Backlog
-