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

Roll Back to Checkpoint: Notify subsystems that rely on OpObservers to maintain state to rebuild state from data on disk

    • Fully Compatible
    • Repl 2017-12-04, Repl 2017-12-18, Repl 2018-01-01, Repl 2018-02-12, Repl 2018-02-26

      We want to add a free function that gets called at the end of rollback and notifies all subsystems that rely on OpObservers to maintain their state that they will need to rebuild that state from the data on disk. This includes (but may not be limited to):

      • Clear in-memory transaction table
      • Check for rollback of the shardIdentity document
      • Invalidate the role graph
      • Invalidate the views catalog.

      Original description:
      After a successful rollback to a checkpoint, the in-memory transaction table needs to be purged to force it to refetch entries from the config.transactions collection, to ensure correctness. To do so, get the SessionCatalog decoration and call resetSessions() on it (names may change). E.g.:

      SessionCatalog::get(opCtx)->resetSessions();
      

      This is already implemented for the rollback by refetching algorithm.

            Assignee:
            william.schultz@mongodb.com William Schultz
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: