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

[sbe][multi_shard_multi_stmt_txn_jscore_passthrough] Tests fail because of incorrect nReturned stat in executionStats

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Query Execution
    • None
    • Query Execution 2021-05-03

      For example, the test orf.js expects 200 in the nReturned stat (task link):

      var a = []; 
      var expectBounds = []; 
      for (var i = 0; i < 200; ++i) {
          a.push({_id: i});
          expectBounds.push([i, i]);
      }
      a.forEach(function(x) {
          t.save(x);
      });
      
      // This $or query is answered as an index scan over
      // a series of _id index point intervals.
      explain = t.find({$or: a}).hint({_id: 1}).explain(true);
      printjson(explain);
      assert.eq(200, explain.executionStats.nReturned, 'n');  // <--- fails
      

      With SBE enabled we only get 109: (task link)

      [multi_stmt_txn_passthrough:orf] assert: [200] != [109] are not equal : n
      

      List of failing tests:

      • jstests/core/orf.js
      • * jstests/core/bindata_indexonly.js

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: