-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
Storage Execution 2026-10-12, Storage Execution 2026-10-26
-
None
-
None
-
None
-
None
-
None
-
None
-
None
auto ValidateAdaptor::validateRecord(...) const { const Status bsonValidationStatus = validateBSON(...); if (!bsonValidationStatus.isOK()) { ... switch (bsonValidationStatus.code()) { case ErrorCodes::NonConformantBSON: LOGV2_WARNING_OPTIONS(..., "Document is not conformant to BSON specifications", ...); ... break; default: LOGV2_ERROR_OPTIONS("Error occurred during BSON validation", ...); return {.status = bsonValidationStatus, ...}; } ... } const BSONObj recordBson = record.data.toBson(); // Other work on recordBson }
ValidateAdaptor::validateRecord swallows NonConformantBSON errors and just logs an error. After the non conformant element, it is possible for the rest of the BSON to be invalid. Code expecting valid BSON can now operate on invalid BSON.
- related to
-
SERVER-136504 BSON Validation should continue to validate after hitting a non structural failure
-
- Open
-