[SERVER-33081] Reset `KeysCollectionManager` during rollback properly Created: 02/Feb/18  Updated: 29/Oct/23  Resolved: 20/Feb/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.2
Fix Version/s: 3.6.6, 3.7.3

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: rollback-functional
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-29213 Have KVWiredTigerEngine implement Sto... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Sharding 2018-02-26
Participants:
Linked BF Score: 0

 Description   

Resetting the `LogicalTimeValidator` calls stopMonitoring/startMonitoring on the underlying KeyManager. These translate to calls to `PeriodicRunner::stop` and `PeriodicRunner::start`. However, the `_inShutdown` flag gets set which causes the restart to invariant.



 Comments   
Comment by Githook User [ 22/May/18 ]

Author:

{'username': 'renctan', 'name': 'Randolph Tan', 'email': 'randolph@10gen.com'}

Message: SERVER-33081 Reset KeysCollectionManager during rollback properly

(cherry picked from commit 9d1a7c5be9edbfdd039723ee91455f35b5ecc948)
(cherry picked from commit 9b9cea70eea59d9a4ad951dc37edc0a29a7b7b9f)
Branch: v3.6
https://github.com/mongodb/mongo/commit/c1633ce07c0237ea37d815838e97b0904ac57885

Comment by Githook User [ 20/Feb/18 ]

Author:

{'email': 'randolph@10gen.com', 'name': 'Randolph Tan', 'username': 'renctan'}

Message: SERVER-33081 Reset KeysCollectionManager during rollback properly
Branch: master
https://github.com/mongodb/mongo/commit/9d1a7c5be9edbfdd039723ee91455f35b5ecc948

Comment by Githook User [ 14/Feb/18 ]

Author:

{'email': 'randolph@10gen.com', 'name': 'Randolph Tan', 'username': 'renctan'}

Message: Revert "SERVER-33081 Reset KeysCollectionManager during rollback properly"

This reverts commit 14f46a166dc729b5c46a081f39511017d4aca828.
Branch: master
https://github.com/mongodb/mongo/commit/4d18e6908acc852c77e97df0bf169c442a9bb306

Comment by Githook User [ 14/Feb/18 ]

Author:

{'email': 'randolph@10gen.com', 'name': 'Randolph Tan', 'username': 'renctan'}

Message: SERVER-33081 Reset KeysCollectionManager during rollback properly
Branch: master
https://github.com/mongodb/mongo/commit/14f46a166dc729b5c46a081f39511017d4aca828

Comment by Randolph Tan [ 06/Feb/18 ]

Since the in memory cached keys does not support rollback, it should be cleared during replication rollback. To fix the current code, I propose to change resetKeyManagerCache such that it destroys the old KeysCollectionManager after it stops the current one, create a fresh KeysCollectionManager, and start it.

In addition, it also needs to do the same thing in rollback_internal::syncFixUp.

Generated at Thu Feb 08 04:32:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.