[SERVER-36025] RestartCatalogCommand can attempt to reinitialize oplog pointers on standalones Created: 09/Jul/18  Updated: 29/Oct/23  Resolved: 19/Jul/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 4.0.0, 4.1.1
Fix Version/s: 4.0.1, 4.1.2

Type: Bug Priority: Minor - P4
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: nyc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-07-30
Participants:
Linked BF Score: 45

 Description   

SERVER-34211 added code to guard against closeAll throwing an exception and potentially leaving the oplog pointer uninitialized.

However, this code can be triggered on standalones, hitting the invariant that the oplog collection exists.

As for the suggested fix, I've talked with kyle.suarez@mongodb.com and we believe the guard from SERVER-34211 is no longer necessary and can be removed. Specifically,
SERVER-35671 moved the uassert such that if its triggered, the catalog is left in a consistent state.



 Comments   
Comment by Githook User [ 19/Jul/18 ]

Author:

{'username': 'dgottlieb', 'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com'}

Message: SERVER-36025: Remove restart catalog command guard to re-establish the oplog pointer.

`DBHolder::closeAll` will no longer leave the catalog in an inconsistent state. If
it fails, the oplog pointer is now guaranteed to be untouched and otherwise valid.

(cherry picked from commit b813bb3e7bacc146695f42750f4ac2809a1a45cd)
Branch: v4.0
https://github.com/mongodb/mongo/commit/d1a32060ff922f7bc38743484d44dad91cb6b617

Comment by Githook User [ 19/Jul/18 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-36025: Remove restart catalog command guard to re-establish the oplog pointer.

`DBHolder::closeAll` will no longer leave the catalog in an inconsistent state. If
it fails, the oplog pointer is now guaranteed to be untouched and otherwise valid.
Branch: master
https://github.com/mongodb/mongo/commit/b813bb3e7bacc146695f42750f4ac2809a1a45cd

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