[SERVER-56143] [sbe][multi_shard_multi_stmt_txn_jscore_passthrough] Tests fail because of incorrect nReturned stat in executionStats Created: 16/Apr/21  Updated: 20/Apr/21  Resolved: 20/Apr/21

Status: Closed
Project: Core Server
Component/s: Query Execution
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Kyle Suarez Assignee: Ian Boros
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-56078 [SBE] Re-enable sharding jscore passt... Closed
Duplicate
duplicates SERVER-55623 [SBE] Make hashed indexing work with ... Closed
Sprint: Query Execution 2021-05-03
Participants:

 Description   

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


 Comments   
Comment by David Storch [ 16/Apr/21 ]

Dupe of SERVER-56073?

Comment by Kyle Suarez [ 16/Apr/21 ]

For bindata_indexonly.js, we expect

   assert.eq(1,                                                                                                                                                                                                                                                                
              explain.executionStats.nReturned,
              "EXACTone.BinData(0, " + blob + ") - should only return one in unique set");

But the nReturned is zero:

[multi_stmt_txn_passthrough:bindata_indexonly] assert: [1] != [0] are not equal : EXACTone.BinData(0, ////////////////////////////) - should only return one in unique set
[multi_stmt_txn_passthrough:bindata_indexonly] doassert@src/mongo/shell/assert.js:20:14
[multi_stmt_txn_passthrough:bindata_indexonly] assert.eq@src/mongo/shell/assert.js:179:9
[multi_stmt_txn_passthrough:bindata_indexonly] testIndexOnlyBinData@jstests/core/bindata_indexonly.js:33:5
[multi_stmt_txn_passthrough:bindata_indexonly] @jstests/core/bindata_indexonly.js:41:1
[multi_stmt_txn_passthrough:bindata_indexonly] @jstests/core/bindata_indexonly.js:6:2
[multi_stmt_txn_passthrough:bindata_indexonly] @jstests/libs/txns/txn_passthrough_runner.js:7:5
[multi_stmt_txn_passthrough:bindata_indexonly] @jstests/libs/txns/txn_passthrough_runner.js:1:2

task link: https://logkeeper.mongodb.org/lobster/build/717337f74106fb565618c27512a2eb20/test/6078616b54f2484f881c0921#bookmarks=0%2C2455&l=1

Generated at Thu Feb 08 05:38:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.