shard-local db and collection caches may not contain timestamps after upgrade in the presence of configsvr stepdowns

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-53104 we make the configsvr tell the shards to refresh their db/collection caches after patching up the configsvr metadata as part of FCV upgrade.

      In the presence of configsvr stepdowns, it cannot be ensured that the shard-local caches will be refreshed. Consider the following situation:

      1. Configsvr patches up config.databases to $set the 'timestamp' field. Then configsvr crashes here.
      2.  On the next setFCV invocation, ShardingCatalogManager::_createDBTimestampsFor49 will be ran again, but it won't find any document in config.databases that matches the query '{timestamp: {$exists: false}}', so this tellShardsToRefreshDatabase won't execute because 'dbDocs' will be empty.

      This same situation can happen for config.collections refresh here and here.

              Assignee:
              Jordi Serra Torrens
              Reporter:
              Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: