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

checkMetadataConsistency should refresh if it finds no cached info for database

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.9, 8.1.0-rc0, 8.0.0-rc1, 7.3.2
    • Affects Version/s: 7.0.8, 7.3.0-rc8, 8.0.0-rc1
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.3, v7.0
    • CAR Team 2024-04-15
    • 12
    • 1

      When the shard is executing a checkMetadataConsistency (_shardsvrCheckMetadataConsistency) with a cluster level, it needs to know all databases which is the db primary shard. This is retrieved by a call on the config server to look for all entries in `config.databases` where the caller is the db primary shard.

      Then, we iterate each database found and try to acquire the DDL lock. Currently, if we receive a StaleDbVersion, the checkMetadataConsistency for that database is skipped.

      Receiving a StaleDbVersion at that point is because of one of the three scenarios:

      1. MovePrimary operation that has changed db primary shard.
      2. Database has been dropped
      3. Database exists but the db primary shard doesn’t know about the existence of this (cached information is marked as unknown)

      The goal of this ticket is to make checkMetadataConsistency not ignore scenario n.3. by triggering a refresh of that database if there is no cached information.

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

              Created:
              Updated:
              Resolved: