[DOCS-15364] Add more detail on what validate considers "invalid documents" Created: 26/May/22  Updated: 30/Oct/23  Resolved: 28/Jul/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: 5.0.0, 6.0.0
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Stennie Steneker (Inactive) Assignee: Jason Price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 36 weeks, 6 days ago
Epic Link: DOCSP-11702
Story Points: 3

 Description   

The validate command reports on "invalid documents" but does not elaborate on what those are: https://www.mongodb.com/docs/manual/reference/command/validate/#mongodb-data-validate.nInvalidDocuments

Invalid documents are those that are not readable according to the underlying storage engine: the BSON document is corrupt with an unexpected error or size mismatch (https://github.com/mongodb/mongo/blob/v5.0/src/mongo/db/catalog/validate_adaptor.cpp#L492)

This is extra confusing with the addition of schema validation via validate in MongoDB 5.0, as nInvalidDocument is unrelated. Documents that do no conform to schema are not counted as invalid.

In MongoDB 6.0 we added a separate nNonCompliantDocuments counter: https://www.mongodb.com/docs/v6.0/reference/command/validate/#mongodb-data-validate.nNonCompliantDocuments


Generated at Thu Feb 08 08:12:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.