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

Recovering the DatabaseShardingState after a rollback should only be triggered by specific namespaces

    • Type: Icon: Improvement Improvement
    • 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-04-28
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, the in-memory DatabaseShardingState cache is recovered from disk (config.shard.catalog.databases) both at startup and after a rollback event.

      During a rollback, this recovery is performed unconditionally because we are using the onConsistentDataAvailable API. However, this API does not provide a way to determine which namespaces were affected by the rollback, unlike the previous onReplicationRollback API.

      As a temporary solution, this ticket proposes switching back to using onReplicationRollback for rollback recovery. This change will prevent the system from clearing and recovering the state from disk for all namespaces, and instead target only those actually affected (config.shard.catalog.databases) — until SERVER-102585 is completed.

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

              Created:
              Updated:
              Resolved: