[SERVER-77858] Collection validation and dbCheck should error if document has an invalid _id Created: 07/Jun/23  Updated: 20/Jul/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: pm-855-quick-win
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-75517 illegal format of `_id` possible via ... Closed
is related to SERVER-75879 Upsert permits document to contain mu... Closed
is related to SERVER-75880 Upsert permits _id values containing ... Closed
Assigned Teams:
Replication
Participants:

 Description   

The update subsystem enforces constraints on the document structure using different C++ code than the insert command. This has led to now-fixed bugs where a document could have had

Additional validation has been introduced into the update subsystem in an upcoming MongoDB version to prevent further introduction of these malformed documents. It would be useful to provide customers a means to identify and remediate any existing documents. This is because future versions of the server may not react in a well-defined way to these malformed documents. Adding checks on the _id field to both the validate and dbCheck commands would make it possible for customers to sooner learn if they are impacted and address the undesirable behavior in their application.


Generated at Thu Feb 08 06:36:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.