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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: 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
    • 3
    • 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
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: