-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
ALL
-
-
🟥 DDL
-
None
-
None
-
None
-
None
-
None
-
None
The test unionWith_allows_stages.js fails sporadically for sharded collections because the $indexStats stage of the following pipeline only runs in one shard when it's expected to run on all of the shards of the cluster (2 in total).
let docArray = collA
.aggregate([
{$match: {val: {$exists: false}}},
{$unionWith: {coll: textColl.getName(), pipeline: [{$indexStats: {}}]}},
{$sort: {name: 1}},
])
.toArray();