Extension $search in $graphLookup on a view fails with CursorNotFound (43) on sharded

XMLWordPrintableJSON

    • Query Integration
    • Fully Compatible
    • ALL
    • v9.0
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      With featureFlagSearchExtension enabled on a sharded cluster, an extension $search inside a
      $graphLookup subpipeline targeting a mongot-defined view fails on the remote shard:

      Executor error during aggregate command ... caused by ::
      Error on remote shard  :: caused by :: cursor id  not found
      code: 43 \(CursorNotFound\)
      

      Steps to reproduce

      resmoke.py run \-\-suites=with\_mongot\_extension\_sharded\_collections 
        jstests/with\_mongot/e2e/views/mongot\_stage\_in\_view\_definition\_graph\_lookup.js
      

      Hypothesis

      The mongot cursor backing the extension $search inside the $graphLookup subpipeline is
      established against the wrong node / torn down early during sharded view resolution, so the shard's
      getMore hits a missing cursor. May share a root cause with the $lookup/$unionWith subpipeline
      view-resolution work in the SPM-4532 stack.

      Affected test (currently excluded in with_mongot_extension override)

      * jstests/with_mongot/e2e/views/mongot_stage_in_view_definition_graph_lookup.js

      Acceptance

      Remove the exclusion tagged with this ticket in the with_mongot_extension override.

            Assignee:
            Finley Lau
            Reporter:
            Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: