[SERVER-43043] Add idempotency test for two fields updates Created: 26/Aug/19  Updated: 29/Oct/23  Resolved: 30/Aug/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-38860 Positional array update behavior of a... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2019-09-09
Participants:

 Description   

Multi-field update op may fail because one field updates a subdocument or subarray field and the sub document/array doesn't exist (because it was deleted by a later op). In that case, the entire update failed to apply. Here's a concrete example.

Before initial sync, the doc is {y: [0]}
--------- start clone --------- 
x = 1
x = 2, y.0 = 2 (multi-field update)
       y = 3
--------- end clone -----------
The expected state is {x: 2, y: 3}



 Comments   
Comment by Githook User [ 31/Aug/19 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-43043 fix update op in test
Branch: master
https://github.com/mongodb/mongo/commit/7e33c24a1c8b0365d4612197745c613907d06a68

Comment by Githook User [ 30/Aug/19 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: SERVER-43043 Test applyOps on missing nested fields
Branch: master
https://github.com/mongodb/mongo/commit/fca8f46ebfb94eebb5784ab54eb4bb774101e947

Comment by Siyuan Zhou [ 26/Aug/19 ]

We also need to test applyOps to reflect MongoMirror's behavior.

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