[SERVER-64662] Investigate and fix test failure in jstests/core/index_stats.js Created: 18/Mar/22  Updated: 29/Oct/23  Resolved: 29/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Yoon Soo Kim Assignee: Rui Liu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-68062 Multi-stage aggregations that use $ge... Closed
Backwards Compatibility: Minor Change
Sprint: QE 2022-04-04
Participants:

 Description   

This issue happens when featureFlagSBELookupPushdown is turned on.

test file: jstests/core/index_stats.js

error message:

[js_test:index_stats] assert: [2] != [NumberLong(0)] are not equal : Expected each lookup to be tracked as an index use
[js_test:index_stats] doassert@src/mongo/shell/assert.js:20:14
[js_test:index_stats] assert.eq@src/mongo/shell/assert.js:179:17
[js_test:index_stats] @jstests/core/index_stats.js:233:8
[js_test:index_stats] @jstests/core/index_stats.js:305:3
[js_test:index_stats] uncaught exception: Error: [2] != [NumberLong(0)] are not equal : Expected each lookup to be tracked as an index use :
[js_test:index_stats] doassert@src/mongo/shell/assert.js:20:14
[js_test:index_stats] assert.eq@src/mongo/shell/assert.js:179:17
[js_test:index_stats] @jstests/core/index_stats.js:233:8
[js_test:index_stats] @jstests/core/index_stats.js:305:3



 Comments   
Comment by Rui Liu [ 29/Mar/22 ]

For the $lookup stage in SBE, the foreign collection statistics, e.g. index access and collection scans will only be counted once for the entire query solution, instead of once per local document.

Comment by Githook User [ 28/Mar/22 ]

Author:

{'name': 'Rui Liu', 'email': 'rui.liu@mongodb.com', 'username': 'lriuui0x0'}

Message: SERVER-64662 Save secondary collection debugInfo for SBE foreign collections
Branch: master
https://github.com/mongodb/mongo/commit/fb7dec3b0825e561f2ea404f42c62e5116351dc1

Generated at Thu Feb 08 06:00:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.