SERVER-126814ClosedFixed

$bucket on untracked viewless timeseries can optimize the pipeline on mongos before prepending $_internalUnpackBucket

For timeseries collections, timeseries rewrites (prepending $_internalUnpackBucket) must happen before any optimizations. On mongos we optimize the pipeline if one of the following are true:  * routingTableIsAvailable * requiresCollationForParsingUnshardedAggregate * hasChangeStream * shouldDoFLERewrite If routingTableIsAvailable is true, then we can perform the timeseries rewrite on mongos and should optimize the pipeline correctly.  If routingTableIsAvailable is false then we do

Affected Versions
Versions known to exhibit this issue
9.0.0-rc0
Fixed Versions
Versions that include the fix
9.1.0-rc09.0.7
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
bkpdino-90-desiredgreenerbuildqi-timeseries