-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
2
-
🟥 DDL
-
None
-
None
-
None
-
None
-
None
-
None
Those suites that automatically shard the collections used by the core tests use the file implicitly_shard_accessed_collections.js to override specific functions.
The problem is that its semantics are unclear and can confuse the developer, leading to the assumption that the coverage of this type of suite is higher than the real one.
These are the main overridden functions and what they do:
A) db.createCollection() -> Implicitly shards a collection if the timeseries field is present.
B) db.getCollection() -> Implicitly shards a collection unless TestData.implicitlyShardOnCreateCollectionOnly is set to true.
C) db.runCommand() -> Overrides only the behavior for mapReduce to create a sharded collection when the 'out' field is given.
In summary, the existence of a flag called TestData.implicitlyShardOnCreateCollectionOnly gives the impression that collections will be implicitly sharded upon createCollection, but this is only true when the collection is a time-series. Here is an example of a 'sharded' suite that will only shard timeseries collections.
The purpose of this ticket is to shard all types of collections upon db.createCollection() except with option B. Also write a test that checks the hook, and it should be executed every time the hook is imported.
- is related to
-
SERVER-118004 Improve override application on FSM suites
-
- Backlog
-
- related to
-
SERVER-118007 Suites should check their hooks are working before starting executing any test
-
- Backlog
-