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

Invariant when committing to the shard-local catalog to be in the critical section

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-03-17
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The `ShardServerOpObserver::onDatabaseMetadataUpdate` is responsible for writing authoritative database metadata to `config.shard.databases` and for creating an oplog entry to inform the secondaries on how to maintain the shard-local catalog cache.

      It's crucial that commits to the shard-local catalog occur within a critical section. The current implementation adheres to this requirement. Additionally, we have introduced replay protection in the command responsible for the commit to safeguard against split-brain scenarios or delays in requests that may arrive after the critical section is released.

      To enhance our guarantees, we would like to explicitly invariant that ensures we are always within the critical section prior to committing.

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

              Created:
              Updated:
              Resolved: