[SERVER-81024] Validation improvements for time-series duplicate index field names Created: 13/Sep/23  Updated: 19/Sep/23  Resolved: 19/Sep/23

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

Type: Improvement Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Shin Yee Tan
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-80358 Time-series inserts generate duplicat... Closed
related to SERVER-80356 Log previous field index when time-se... Closed
Sprint: Execution NAMR Team 2023-09-18, Execution NAMR Team 2023-10-02
Participants:

 Description   

If a time-series bucket fails to pass the collection's schema, we skip running any time-series specific checks. A bucket will fail to pass the schema check if there are duplicate index field names present (SERVER-80358). Validate will return {valid: true} and log a warning in this case:

A BSON document contains a duplicate field name : 1 in element with field name 'data.1' in object with _id: ObjectId('65006634684c43032fbe1693')

To improve the detection of this issue we can update the check added in SERVER-80356. We should add extra logic to help us distinguish between safe and unsafe cases (missing fields). This new check would be an error instead of a warning, and we can improve the error message.


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