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

Allow pipeline with $lookup into a sharded collection to run on mongod

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.8
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Go to jstests/noPassthrough/lookup_max_nested_pipeline.js, remove the if(0){...} wrapping sharded test, and run this test. 

      Show
      Go to jstests/noPassthrough/lookup_max_nested_pipeline.js, remove the if(0){...} wrapping sharded test, and run this test. 
    • Sprint:
      Query 2019-01-14, Query 2019-01-28, Query 2019-02-11

      Description

      Currently, running a nested $lookup pipeline on a sharded cluster will fail: 

       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 2018-12-20T13:33:59.472-0500 E QUERY    [js] Error: command failed: {
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "ok" : 0,
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "errmsg" : "$lookup must run on mongoS, but cannot :: caused by :: $lookup must run on a shard",
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "code" : 20,
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "codeName" : "IllegalOperation",
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "operationTime" : Timestamp(1545330839, 14),
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "$clusterTime" : {
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "clusterTime" : Timestamp(1545330839, 16),
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.473-0500 "signature" : {
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.474-0500 "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.474-0500 "keyId" : NumberLong(0)
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.474-0500 }
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.474-0500 }
       
      [js_test:lookup_max_nested_pipeline] 2018-12-20T13:33:59.474-0500 } :
      
      

       Part of this ticket is changing jstests/noPassthrough/lookup_max_nested_pipeline.js to also run in the sharded case. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ian.boros Ian Boros
              Reporter:
              brigitte.lamarche Brigitte Lamarche (Inactive)
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: