[SERVER-68129] Add the field `control.count` to the schema validation for bucket collections Created: 19/Jul/22  Updated: 29/Oct/23  Resolved: 17/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0, 6.0.9

Type: Task Priority: Major - P3
Reporter: Yuhong Zhang Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
causes SERVER-71177 Timeseries collection creation fails ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0
Sprint: Execution Team 2022-08-22
Participants:
Linked BF Score: 23

 Description   

The current validator for a bucket's control field only checks

control: { bsonType: \"object\", required: [ \"version\", \"min\", \"max\" ], properties: { version: { bsonType: \"number\" }, min: { bsonType: \"object\", required: [ \"time\" ], properties: { time: { bsonType: \"date\" } } }, max: { bsonType: \"object\", required: [ \"time\" ], properties: { time: { bsonType: \"date\" } } }, closed: { bsonType: \"bool\" } } } 

We might also want to consider adding additionalProperties: false to disallow extra fields in control.



 Comments   
Comment by Githook User [ 26/Jul/23 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-68129 Add the field `control.count` to the schema validation for bucket collections

(cherry picked from commit e6da72a7ac2b1a8650de634fe06cc9f7b55db24e)
Branch: v6.0
https://github.com/mongodb/mongo/commit/429972eadea69c969fbd940c47403cfdce8b1173

Comment by Githook User [ 16/Aug/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-68129 Add the field `control.count` to the schema validation for bucket collections
Branch: master
https://github.com/mongodb/mongo/commit/e6da72a7ac2b1a8650de634fe06cc9f7b55db24e

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