[SERVER-78599] Prevent change collections from truncating inconsistent data Created: 03/Jul/23  Updated: 29/Oct/23  Resolved: 01/Sep/23

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

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Yujin Kang Park
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-77972 Investigate that PreImagesTruncateMan... Closed
related to SERVER-38341 Remove Parallel Batch Writer Mutex Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution EMEA Team 2023-07-24, Execution EMEA Team 2023-08-21, Execution EMEA Team 2023-09-04
Participants:

 Description   

Change collection truncation is performed on both primaries and secondaries. Data is only safe to truncate once the data is consistent up to the maximum timestamp to be truncated. In the case of the primary, this means not truncating after the no oplog hole point (all durable timestamp). On secondaries, it means not truncating past the lastApplied timestamp. 

 

The changes for this ticket should mirror the safeguards in place for pre-image truncation and be primary/secondary agnostic. 

 

Old Description:

SERVER-77972 describes a potential issue about holding the PBWM while initializing / truncating CollectionTruncateMarkers. We should investigate the implications of holding the lock for change stream change collection CollectionTruncateMarkers.



 Comments   
Comment by Githook User [ 01/Sep/23 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-78599 Prevent change collections from truncating documents after all_durable and lastApplied
Branch: master
https://github.com/mongodb/mongo/commit/f9b4b7f75eb9f16897fd1f0b9dcb02d22cc4a078

Comment by Haley Connelly [ 11/Aug/23 ]

Marking as related to SERVER-38341 to track why the description changed. SERVER-38341 removed the concept of the PBWM lock altogether. 

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