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

Delete implicit collection creation loop through the config server in sharding

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.3
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2019-11-04, Sharding 2019-11-18, Sharding 2019-12-02, Sharding 2019-12-16, Sharding 2019-12-30, Sharding 2020-01-13

      PM-1168 will allow implicitly creating collections inside transactions, which would fail in sharding today because of this uassert in DatabaseImpl::createCollection. (Hitting the uassert would abort the transaction on the shard.)

      Since the implicit collection creation loop through the config server is not currently used for adding new collections immediately into the sharding catalog, we will just delete this loop and revisit implicit collection creation as part of other catalog work in the future.

      Background

      In sharding, shards never implicitly create collections on themselves. Instead, if they receive a request that would implicitly create a collection, they throw here.

      The exception is caught in the service entry point on the shard, and a handler that sends _configsvrCreateCollection to the config server is invoked.

      The _configsvrCreateCollection command then creates the collection on the primary shard.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: