[SERVER-80789] Make AutoGetOplog behave consistently in replica set node started as standalone Created: 06/Sep/23  Updated: 01/Dec/23  Resolved: 08/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.0.5, 6.0.13, 7.1.2, 5.0.24

Type: Bug Priority: Major - P3
Reporter: Yujin Kang Park Assignee: Yujin Kang Park
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-74642 Log additional information about the ... Closed
Related
related to SERVER-80863 Centralise cached oplog pointer initi... Backlog
is related to SERVER-80809 Make _logOplogEntriesForInvalidResult... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0, v5.0
Sprint: Execution EMEA Team 2023-09-18
Participants:
Linked BF Score: 5

 Description   

AutoGetOplog does not behave as expected due to the collection pointer not being cached in standalone mode, even if the collection exists because previously the node was started as part of a replica set.

 

Example:

When validate cmd detects and inconsistency it attempts to fetch the associated oplog entry. To do so, it uses AutoGetOplog, which relies on LocalOplogInfo. 

The Collection ptr in LocalOplogInfo is not populated in standalone mode (acquireOplogCollectionForLogging) unless recoverFromOplogAsStandalone, resulting in a segmentation fault due to dereferencing a nullptr.



 Comments   
Comment by Githook User [ 30/Nov/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone
Branch: v6.0
https://github.com/mongodb/mongo/commit/d0669cbd4b4bae908eca9020eb1c8fcf5392be8b

Comment by Githook User [ 30/Nov/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone
Branch: v5.0
https://github.com/mongodb/mongo/commit/b9920996b720db55b455450a3c365e6e33e9c1d3

Comment by Githook User [ 29/Nov/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone
Branch: v7.1
https://github.com/mongodb/mongo/commit/fd2749a608ddbed4bf7dd26b4f1b90bf7c687f1c

Comment by Githook User [ 29/Nov/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone
Branch: v7.0
https://github.com/mongodb/mongo/commit/5c8a2a8720eb6f8fb31afce29d392a730a197bb9

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone
Branch: master
https://github.com/mongodb/mongo/commit/9e18c58814293cdb36f303e940a1df082a4c9fe5

Generated at Thu Feb 08 06:44:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.