-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Following SERVER-113685 / AF-8199 / CVE-197 , a request was made to audit our testing coverage for _id. There are two things that are _id:
- the _id field in a collection, which can be used in various DDL admin statements and such
- the _id field in a pipeline, which may come from a collection or be produced by some pipeline stage.
The test coverage for both uses of _id was audited. While there is a lot of use of _id and some incidental coverage from unrelated tests, the following cases do not seem to be covered completely or systematically:
1. The use of _id in createIndex() in jstests is somewhat incidental, and does not cover the full matrix of possible cases:
_id with different field arrangements and sort orders
_id with different index types
_id with different index options (collation, clustered, unique)
2. There is no systematic coverage for_id being redefined by the various pipeline stages, such as $addFields, $replaceRoot, $unwind, $lookup, $merge, various aggregations ($densify, $fill, etc) followed by an attempt to use said redefinition of _id
3. Usage of _id in a DML MQL, such as findOneAndDelete, bulkWrite
4. Use of _id in expressions, such as $toString , regex
5. Use of _id in schema validation
6. Use of corner case _id values are rejected (MinKey, MaxKey, maximum size, etc)
- is related to
-
SERVER-113685 Segfault for query on compound wildcard index
-
- Closed
-
-
SERVER-115223 Audit testing coverage of _id in MQL and commands (e.g. createIndex)
-
- Closed
-