ExportXMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • ALL
    • v9.0, v8.3, v8.0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The tassert is triggered when a stage which sets HostTypeRequirement::kAllShardHosts is followed by a stage with which requires a shard but which does not set mergeShardId, such as $unionWith (kTargetedShards) or $group with allowDiskUse=true which disqualifies the mongos.

      We also need to have no collation on the command and the collection to be untracked.

      The following fail:

      [\{$planCacheStats: {allHosts: true}}, $unionWith: \{...}]

      [\{$planCacheStats: {allHosts: true}}, $group: \{...}], {allowDiskUse: true}

      Other stages which could be used for kAllShardHosts are collStats, $currentOp.

      I've attached a reproduction script.

            Assignee:
            Vesko Karaganev
            Reporter:
            Vesko Karaganev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: