[SERVER-66774] Insertion order of capped collections may not be preserved after initial sync Created: 25/May/22  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-66775 Enhance consistency checking for capp... Backlog
Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

This is a very corner case. But since we ignore duplicateKey during initial sync and during oplog application, I think the following sequence is possible:

Sync Source Syncing nodes
Insert 1, 2:
[1, 2]
Clone 1, 2:
[1, 2]
Rollover/delete 1:
[2]
 
Insert 1, 3:
[2, 1, 3]
Clone 1, 3
[1, 2, 3] because duplicateKey on (1) is ignored
  Start oplog application
  Apply delete(1), insert(1), insert(3):
[2, 3, 1] because duplicateKey on (3) is ignored

 


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