[SERVER-68761] Add a jscore passthrough suite that has query sampling enabled Created: 11/Aug/22  Updated: 29/Oct/23  Resolved: 21/Dec/22

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

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Israel Hsu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-71059 Make the query sampling suites period... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding NYC 2022-11-14, Sharding NYC 2022-11-28, Sharding 2022-12-12, Sharding NYC 2022-12-26
Participants:

 Comments   
Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Israel Hsu', 'email': 'israel.hsu@mongodb.com', 'username': 'israelhsu'}

Message: SERVER-68761 Setup jscore passthrough test suite for query sampling
Branch: master
https://github.com/mongodb/mongo/commit/b9717b01dc7b893fd4cdb8e1dad974237eddf7f3

Comment by Israel Hsu [ 12/Dec/22 ]

cheahuychou.mao@mongodb.com
In this evergreen test suite we get a lot of errors, due to other mongod versions being used
"errmsg" : "no such cmd: configureQueryAnalyzer"
How do I disable the analyze_shard_key tests for this suite?

Comment by Israel Hsu [ 07/Dec/22 ]

A note about ValidateCollections and kill-primary passthrough suites: Part of the ValidateCollections hook in the yml file is to compare the document count to the expected value; this uses WiredTiger's fast-count. In the case of a killed primary, WiredTiger's fast-count may be out-of-date. Thus, for kill-primary passthrough suites, the fast-count check is disabled through a global variable in TestData: TestData.skipEnforceFastCountOnValidate: true.

Comment by Israel Hsu [ 23/Nov/22 ]

Considering Jack's comments I've removed the override/wrapper for insert() and drop() and reimplemented getCollection() as he suggested.
I also excluded a number of tests that have already been shown not to work with implicitly sharded collections.

I also temporarily removed the passthrough suites for kill and terminate, as Jack suggested. When it's shown that stepdown suite is all green, we can add these back in.

Comment by Israel Hsu [ 22/Nov/22 ]

In js tests, the shell DB.prototype.getCollection() creates a collection object, but does not execute any command (or result in any change) in the server – a collection is only created (as needed) on insert. Therefore, wrapping getCollection() to execute the configureQueryAnalyzer command would only result in NamespaceNotFound error for new collections.

What should be done instead of wrapping getCollection() is to wrap insert. The wrapper will maintain a set of namespaces that have been referenced, and on first reference, the wrapper will execute configureQueryAnalyzer. We'll also need to wrap dropCollection and dropDatabase in order to remove namespace(s) from the set.

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