Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
5.0.2, 5.0.3
-
None
-
Fully Compatible
-
ALL
-
-
Execution Team 2022-04-04
Description
If I create a collection with validationLevel: strict and validationAction: warn, and subsequently run db.collection.validate() on a collection containing invalid documents, I would expect the number of invalid documents and the warnings array to be populated
However, running `db.collection.validate()` on a collection with invalid documents returns unexpected results:
- nInvalidDocuments is 0
- and no messages present in the warnings[] or errors[] array
The logs for the server do log the errors, but the errors are not reflected in the output to db.collection.validate().
If I use validationAction: error, then execute `db.collection.validate()`, there is a warning present in warnings[] but nInvalidDocuments is still 0.
Attachments
Issue Links
- is documented by
-
DOCS-15206 Investigate changes in SERVER-60708: db.collection.validate() returns `nInvalidDocuments: 0` when invalid documents are present
-
- Closed
-
- is related to
-
SERVER-65078 'validate' to report non-compliant documents as errors when the validation level is 'error' in testing
-
- Closed
-
- related to
-
SERVER-53635 Add document schema validation to validate() command
-
- Closed
-