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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • 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. 
    • Query 2019-01-14, Query 2019-01-28, Query 2019-02-11

      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. 

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

              Created:
              Updated:
              Resolved: