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

Create `config.shard.databases` collection at startup if missing

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Instead of allowing entries to create the config.shard.databases collections dynamically when inserting for first time, we should evaluate the feasibility of initializing this collections at startup.

      This would enforce a stricter contract ensuring that these namespaces remain unchanged unless explicitly modified during maintenance mode.

      Furthermore, when we are executing this code, we are already in an OpObserver, which means we are not in a clean context. Creating a collection in this context has the possibility of causing deadlocks (or at least we have to think hard why there are no deadlocks) and inheriting settings from an already running operation. Basically, all the problems that stem from doing database things in the OpObservers.

            Assignee:
            Unassigned Unassigned
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: