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.
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.:
This is already implemented for the rollback by refetching algorithm.