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

Move force primary refresh functionality out of the ShardServerCatalogCacheLoader into the ShardingState's refresh logic

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding EMEA
    • Sharding 2017-12-04

      We want to simplify the ShardServerCatalogCacheLoader by making a simple local loader and reader of chunk metadata. So we want to move the remote call to ensure the primary has refreshed to the latest metadata out of the ShardServerCatalogCacheLoader and instead place this functionality at a higher level in the refresh logic in ShardingState::onStaleShardVersion. A rough sketch:

      onStaleShardVersion(wantedVersion) {
          while () {
              invalidateCatalogCacheMetadata
              refreshAndLoadLocalChunkMetadata
              if (wantedVersion > locallyRefreshedVersion) {
                  optime = forcePrimaryRefresh
                  waitForOptime(optime)
              }
          }
      }
      

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: