[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: |
|
||||||||
| 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: |
| 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. |