Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-100708

Explain throws exception while the command returns empty results in sharded collection aggregation

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • Hide

      Reproduction scripts:

      buildscripts/resmoke.py run --suites=sharded_collections_query_shape_hash_stability --force-excluded-tests jstests/core/timeseries/query/timeseries_merge.js 

       

       

      Show
      Reproduction scripts: buildscripts/resmoke.py run --suites=sharded_collections_query_shape_hash_stability --force-excluded-tests jstests/core/timeseries/query/timeseries_merge.js    
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This is a scenario where running the same command directly on a replicaset's primary of a sharded cluster behaves differently. In this attached snippet, explain represents the output of explain and res represents the output of the command itself.

      {
          "host": "localhost:20001", 
          "explain": {
              "ok": 0,
              "errmsg": "Cannot find index to verify that join fields will be unique",
              "code": 51183,
              "codeName": "Location51183",
              "$clusterTime": {
                  "clusterTime": Timestamp(1739201529, 56),
                  "signature":
                      {"hash": BinData(0, "AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId": NumberLong(0)}
              },
              "operationTime": Timestamp(1739201529, 51)
          },
          "res": {
              "cursor": {"id": NumberLong(0), "ns": "timeseries_merge.observer_in", "firstBatch": []},
              "ok": 1,
              "$clusterTime": {
                  "clusterTime": Timestamp(1739201530, 19),
                  "signature":
                      {"hash": BinData(0, "AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId": NumberLong(0)}
              },
              "operationTime": Timestamp(1739201530, 19)
          }
      }
      

      Will attach the reproduction scenario below.

            Assignee:
            Unassigned Unassigned
            Reporter:
            victorfilip.ghita@mongodb.com Victor Ghita
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None