Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68129

Add the field `control.count` to the schema validation for bucket collections

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0, 6.0.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v6.0
    • Execution Team 2022-08-22
    • 23

      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.

            Assignee:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Reporter:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: