[SERVER-62615] Oplog application skips applying entries for collections not restored Created: 13/Jan/22  Updated: 29/Oct/23  Resolved: 09/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Matt Kneiser
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-63787 Add point-in-time functionality to re... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-02-21, Execution Team 2022-03-07, Execution Team 2022-03-21
Participants:

 Description   

When the node is restarted to replay all of the oplog entries up to the desired point-in-time, the oplog application will need to skip applying entries for collections not restored. An applyOps oplog entry can contain multiple oplog entries referencing multiple collections. This is how committed multi-document transactions are structured. Oplog entries on collections not restored will need to be skipped. The same needs to be done when foreign oplog entries are inserted.



 Comments   
Comment by Githook User [ 08/Mar/22 ]

Author:

{'name': 'Matt Kneiser', 'email': 'matt.kneiser@mongodb.com', 'username': 'themattman'}

Message: SERVER-62615 Test operations spanning un/restored collections
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/1a68edc5fb25116d720f6af60191d2a69c3fe090

Comment by Matt Kneiser [ 04/Mar/22 ]

No action needed code-wise. Adding a test to exercise this case.

 

The application of oplog entries on a non-existing collection are considered acceptable failures and skipped.

In oplog.cpp, applyCommand_inlock() attempts to apply each oplog entry. It catches errors like "NamespaceNotFound" and continues to the next oplog without returning or crashing. This behavior has been around for quite some time.

Generated at Thu Feb 08 05:55:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.