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

Enable API version validation of collection validator expression during creation of tracked collections

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • Hide

      Search the TODOs that reference this ticket in the tests, remove them, and run the tests.

      Show
      Search the TODOs that reference this ticket in the tests, remove them, and run the tests.

      The validator expression used when creating a new collection should be validated according to the configured API version.

      On sharded cluster with TrackUnshardedCollectionsUponCreation feature flag enabled, this validation is not happening. As a consequence, the user could successfully create a collection using a validator that violates the current API version configuration.
       
      When this feature flag is enabled, we use the CreateCollectionCoordinator to create the collection that runs on a different thread/opCtx than the original request. Since the API version configuration is propagated through the opCtx when we use the coordinator we lose this information thus all the subsequent execution of the collection creation, including validation check will ignore the provided API version.

      The goal of this ticket is to fix this issue and remove all the associated TODOs.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: