[SERVER-78025] invalid_system_views.js fails in query_stats_passthrough Created: 13/Jun/23  Updated: 29/Oct/23  Resolved: 14/Sep/23

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

Type: Bug Priority: Major - P3
Reporter: Will Buerger Assignee: Mariano Shaar
Resolution: Fixed Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-85111 Tracking: Known M2 correctness bugs Closed
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QI 2023-09-18
Participants:

 Description   

SERVER-76220 was intended to unlock coverage of tests with the "references_foreign_collection" tag in the query_stats_passthrough. However, invalid_system_views.js fails with the error:

"Error: listCollections failed: "Invalid view definition detected in the view catalog. Remove the invalid view manually to prevent disallowing any further usage of the view catalog." 

 

Full stack trace:

[js_test:invalid_system_views:ValidateCollections] uncaught exception: Error: command failed: {
[js_test:invalid_system_views:ValidateCollections]      "ok" : 0,
[js_test:invalid_system_views:ValidateCollections]      "error" : "Error: listCollections failed: {\n\t\"ok\" : 0,\n\t\"errmsg\" : \"Invalid view definition detected in the view catalog. Remove the invalid view manually to prevent disallowing any further usage of the view catalog.\",\n\t\"code\" : 182,\n\t\"codeName\" : \"InvalidViewDefinition\"\n}",
[js_test:invalid_system_views:ValidateCollections]      "stack" : "_getErrorWithCode@src/mongo/shell/utils.js:24:13\nDB.prototype._getCollectionInfosCommand@src/mongo/shell/db.js:701:15\nDB.prototype.getCollectionInfos@src/mongo/shell/db.js:749:21\n@eval:48:27\n@eval:28:50\n_threadStartWrapper@:26:28\n",
[js_test:invalid_system_views:ValidateCollections]      "host" : "localhost:20000"
[js_test:invalid_system_views:ValidateCollections] } : Collection validation failed :
[js_test:invalid_system_views:ValidateCollections] _getErrorWithCode@src/mongo/shell/utils.js:24:13
[js_test:invalid_system_views:ValidateCollections] doassert@src/mongo/shell/assert.js:18:14
[js_test:invalid_system_views:ValidateCollections] _assertCommandWorked@src/mongo/shell/assert.js:766:25
[js_test:invalid_system_views:ValidateCollections] assert.commandWorked@src/mongo/shell/assert.js:860:16
[js_test:invalid_system_views:ValidateCollections] CollectionValidator/this.validateNodes/<@jstests/hooks/validate_collections.js:160:24
[js_test:invalid_system_views:ValidateCollections] CollectionValidator/this.validateNodes@jstests/hooks/validate_collections.js:159:24
[js_test:invalid_system_views:ValidateCollections] @jstests/hooks/run_validate_collections.js:82:27
[js_test:invalid_system_views:ValidateCollections] @jstests/hooks/run_validate_collections.js:94:3
[js_test:invalid_system_views:ValidateCollections] failed to load: jstests/hooks/run_validate_collections.js



 Comments   
Comment by Mariano Shaar [ 14/Sep/23 ]

will.buerger@mongodb.com and I could no longer recreate the bug, but it was likely caused by this line since it always tried to get the collectionType, unlike this line which had a validation step for views. It got fixed by this code change and now the test behaves as expected.
 
 
 
 

Comment by Githook User [ 14/Sep/23 ]

Author:

{'name': 'Mariano Shaar', 'email': 'mariano.shaar@mongodb.com', 'username': 'shaargtz'}

Message: SERVER-78025 Remove skip tag and TODO from working test
Branch: master
https://github.com/mongodb/mongo/commit/87891b58949af1632f04ceb6fe74cc5cc96977eb

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