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

Refactor ShardingCatalogManager::commitCreateDatabase()

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

      The function currently contains lots of logics of handling change stream, holding _kShardMembershipLock and performing existence & draining checks, and actually committing the transaction of writing to sharding catalog for the database creation. It is used to both the old and new database creation paths as a whole since it cannot be easily broken down into smaller free functions. After the change stream handling is removed, we should revisit and consider doing at least:

      1. Breaking it down into free functions to remove createDatabase coordinator's dependency on sharding catalog manager
      2. Remove unnecessary parameters like userSelectedPrimary

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

              Created:
              Updated: