[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: PNG File 7fd37fc0.png     JPEG File abfd8588.jpg    
Issue Links:
Backports
Depends
is depended on by SERVER-65859 Enable filtering of change steam even... Closed
is depended on by SERVER-64107 Clean up orphaned doc handling in the... Closed
is depended on by SERVER-65295 Handle direct CRUD ops to shards as p... Closed
Problem/Incident
causes SERVER-67352 Skip identifying writes on orphaned d... Closed
Related
related to SERVER-66312 Tests on batched operations do not in... Closed
related to SERVER-66423 Set the fromMigrate flag of DurableRe... Closed
related to SERVER-74589 move logic for marking orphan documen... Closed
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: SERVER-65858 Mark the applyOps entries when the operations involves orphaned documents
Branch: v6.0
https://github.com/mongodb/mongo/commit/8c9ceb09f28bdecbfc896994f45f9a69f1011eca

Comment by Githook User [ 06/May/22 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65858 Mark the applyOps entries when the operations involves orphaned documents
Branch: master
https://github.com/mongodb/mongo/commit/6c473cb6b7f8d9e7604c6bd210a338fc23e365e7

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.

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