[SERVER-29933] Roll Back to Checkpoint: Notify subsystems that rely on OpObservers to maintain state to rebuild state from data on disk Created: 30/Jun/17  Updated: 30/Oct/23  Resolved: 21/Feb/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: William Schultz (Inactive)
Resolution: Fixed Votes: 0
Labels: rollback-functional
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-29895 Roll Back to Checkpoint: Make Rollbac... Closed
is depended on by SERVER-32982 Remove rolled back index builds after... Closed
Related
related to SERVER-29531 Handle Rollbacks in SessionTransactio... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-12-04, Repl 2017-12-18, Repl 2018-01-01, Repl 2018-02-12, Repl 2018-02-26
Participants:

 Description   

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.



 Comments   
Comment by William Schultz (Inactive) [ 21/Feb/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: Fix merge conflict in op_observer_impl_test
Branch: master
https://github.com/mongodb/mongo/commit/6aa704c31f2489e60aa3d1cd0d5ce1ec014b907a

Comment by Githook User [ 21/Feb/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: SERVER-29933 Fix argument type in rollback_impl_test
Branch: master
https://github.com/mongodb/mongo/commit/52372481401a83cdac66a1f71b70ba622508d694

Comment by Githook User [ 21/Feb/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: SERVER-29933 Add onReplicationRollback OpObserver method
Branch: master
https://github.com/mongodb/mongo/commit/788369eb773eede21ee0f492363bb7e64054ffd3

Comment by Judah Schvimer [ 12/Feb/18 ]

As part of this ticket (or file a new one), we must remove any collections whose drop oplog entries are rolled back from the DropPendingCollectionReaper.

Comment by Judah Schvimer [ 01/Aug/17 ]

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:

  • Clear in-memory transaction table
  • Check for rollback of the shardIdentity document
  • Invalidate the roll graph
  • Invalidate the views catalog.
Generated at Thu Feb 08 04:22:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.