Sharded explain of extension $search in $unionWith+$lookup fails with IDLDuplicateField (40413)

XMLWordPrintableJSON

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

      Overview

      On a sharded cluster, running explain on an extension $search / $searchMeta pipeline that
      contains $unionWith + $lookup fails to serialize the explain response:

      BSON field 'VectorClockComponents.explainVersion' is a duplicate field
      code: 40413 \(IDLDuplicateField\)
      

      The explainVersion field is written twice into the explain/response BSON, tripping IDL
      duplicate-field validation. This is an explain-serialization bug (distinct from SERVER-131024, which
      adapted explain test expectations to the extension stage names).

      Steps to reproduce

      resmoke.py run \-\-suites=with\_mongot\_extension\_sharded\_collections 
        jstests/with\_mongot/e2e/explain\_execution\_stats/search\_union\_with\_lookup\_explain.js
      

      Hypothesis

      The router and shard both contribute an explainVersion (or a VectorClock component is appended
      twice) when merging explain output for a subpipeline extension search stage.

      Affected tests (currently excluded in with_mongot_extension override)

      * jstests/with_mongot/e2e/explain_execution_stats/search_union_with_lookup_explain.js
      * jstests/with_mongot/e2e/explain_execution_stats/search_meta_union_with_lookup_explain.js

      Acceptance

      Remove the two exclusions tagged with this ticket in the with_mongot_extension override.

            Assignee:
            Aditya Deshpande
            Reporter:
            Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: