[SERVER-81878] startupRecoveryForRestore may not play nicely with collection drop applied during startup recovery Created: 04/Oct/23  Updated: 27/Dec/23  Resolved: 15/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.0, 4.4.7
Fix Version/s: 4.4.27, 5.0.24

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

Issue Links:
Backports
Problem/Incident
causes SERVER-84432 mongod crashes on start with --recove... Backlog
is caused by SERVER-55766 Introduce an optimized "for restore" ... Closed
Related
is related to SERVER-81879 startupRecoveryForRestore can drop ta... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Execution Team 2023-11-13, Execution Team 2023-11-27
Participants:
Case:

 Description   

On v5.0, when using recoverFromOplogAsStandalone, after recovering from the oplog we set the internal readOnly flag to true. If also using startupRecoveryForRestore, we have also advanced the oldest timestamp during the oplog application, as described in SERVER-55766. This means that the drop-pending ident reaper will run, dropping any tables from a collection drop applied during the recovery. Then when we go to drop the ident, we can run into an IllegalOperation error because the readOnly flag is set.



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

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-81878 Allow writes in read-only mode from ident reaper

(cherry picked from commit 3e7169f6c0433cac7f6b60271335cae30179e6b8)

GitOrigin-RevId: 27546df3ba66a7a12488c71cfa0b71a43f83490e
Branch: v4.4
https://github.com/mongodb/mongo/commit/3187d717c3314f96a0288b4b8ebc99c270ea490a

Comment by Githook User [ 15/Nov/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-81878 Allow writes in read-only mode from ident reaper
Branch: v5.0
https://github.com/mongodb/mongo/commit/3e7169f6c0433cac7f6b60271335cae30179e6b8

Comment by Gregory Noma [ 15/Nov/23 ]

Upon further inspection I think this is actually also fixed on 6.0 because of SERVER-52877

Comment by Gregory Noma [ 14/Nov/23 ]

I believe this is fixed as of 6.1 thanks to SERVER-60761. In which case this likely affects 4.4, 5.0, and 6.0

Comment by Steven Vannelli [ 05/Oct/23 ]

We need to understand which branches this affects and think through potential solutions. 

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