[SERVER-80809] Make _logOplogEntriesForInvalidResults resilient to non-existing oplog Created: 06/Sep/23  Updated: 29/Oct/23  Resolved: 07/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 5.0.22, 7.0.3, 6.0.12

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

Issue Links:
Backports
Related
related to SERVER-80789 Make AutoGetOplog behave consistently... Closed
is related to SERVER-74642 Log additional information about the ... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.1, v7.0, v6.0, v5.0
Sprint: Execution NAMR Team 2023-09-18
Participants:

 Description   

_logOplogEntriesForInvalidResults does not check if the oplog pointer is valid.

One case where this could happen was when running validate on a replica set member started as standalone. Even though the oplog existed, AutoGetOplog returned nullptr. This is being handled in SERVER-80789.

The other possibility is that the oplog doesn't actually exist because the node has always been standalone. We should check if it is possible to hit this code with timestamps in recordTimestamps (passing this check) in this case, and if so make the code resilient.



 Comments   
Comment by Githook User [ 16/Oct/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-80809 Make _logOplogEntriesForInvalidResults resilient to non-existing oplog
Branch: v6.0
https://github.com/mongodb/mongo/commit/06b79d2e9280f34aa58e6bfc4d7869a156fc0003

Comment by Githook User [ 16/Oct/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-80809 Make _logOplogEntriesForInvalidResults resilient to non-existing oplog
Branch: v7.0
https://github.com/mongodb/mongo/commit/b7460d0960cb2389f214fc5d9e0a685f73e37825

Comment by Githook User [ 16/Oct/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-80809 Make _logOplogEntriesForInvalidResults resilient to non-existing oplog
Branch: v5.0
https://github.com/mongodb/mongo/commit/9942d01baee6c403653832e18b1e8f51c9496d16

Comment by Githook User [ 07/Sep/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-80809 Make _logOplogEntriesForInvalidResults resilient to non-existing oplog
Branch: master
https://github.com/mongodb/mongo/commit/2501fcc73505f83a13f2b178d11b221b0c6c68d0

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