OpObserver should cause secondary to invalidate in-memory cache entry for db

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.4
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2018-04-09, Sharding 2018-04-23
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In order for a secondary to invalidate its in-memory cache entry for a database, we need to add OpObservers to watch for a db refresh.

      This is the chain of events we expect to happen:
      1) entering movePrimary critical section increments 'enterCriticalSectionSignal' field in the document in config.cache.databases
      2) secondary replicates the update, OpObserver causes it to clear its in-memory cached database entry
      3) the next request with databaseVersion that comes into the secondary will make the secondary try to refresh because its in-memory cached entry is empty
      4) the secondary's refresh will
      a) call forceDatabaseCacheUpdates on the primary, which blocks behind the critical section and then forces the primary to do a remote refresh
      b) wait for replication of the writes from the refresh
      c) read the updated database entry from disk (now that it has replicated)

              Assignee:
              Janna Golden
              Reporter:
              Janna Golden
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: