[SERVER-65858] Mark the applyOps entries when the operations involves orphaned documents Created: 21/Apr/22 Updated: 29/Oct/23 Resolved: 06/May/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc6, 6.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Antonio Fuschetto | Assignee: | Antonio Fuschetto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v6.0
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Sharding EMEA 2022-05-02, Sharding EMEA 2022-05-16 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 135 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
The full picture of problem and solution is described here. The goal of this ticket is to extend the applyOps entries with the fromMigrate flag and set it when the operations involve orphaned documents. |
| Comments |
| Comment by Githook User [ 12/May/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 06/May/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Antonio Fuschetto [ 02/May/22 ] |
|
The classes that model the different oplog entries have been enhanced in order to allow the individual statements of transaction to be flagged with fromMigrate. In detail, the initial class diagram follows, where the fromMigrate flag was available for the OplogEntryBase and MutableOplogEntry classes, used for oplog entries of single statements:
Now, the DuarableReplOperation and ReplOperation offer the same flag so that individual statements of a transaction can be marked:
For a good understanding of the diagram, it's important to highlight that the OplogEntryBase class includes - and does not extend - the OperationSessionInfo and DurableReplOperation classes. For this reason it's essential to explicitly expose the fromMigrate(bool) and fromMigrateIfTrue(bool) member functions. |