[SERVER-56010] Writes from primary services can interfere with latest optimes in replica set tests Created: 09/Apr/21  Updated: 29/Oct/23  Resolved: 22/Jun/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 5.0.0-rc4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Wenbin Zhu
Resolution: Fixed Votes: 0
Labels: post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Repl 2021-06-28
Participants:
Linked BF Score: 143

 Description   

This came up with the TenantMigrationsDonorService, but any primary service could cause this.

One such example is when we use the stopReplicationAndEnforeNewPrimaryToCatchUp function to test catchup in several places. For these tests, we'd want some node A to be elected but still be behind the current primary. Any internal write that generates an oplog entry can cause A to lose the election if other nodes replicate the write and A does not. These tests run with chaining enabled, which makes such a scenario more likely.

This could be a problem for testing replica sets in general since it could cause a node's lastApplied opTime to be different than what we'd expect. One such impact is that it could result in a desired node failing to get elected, but there are many other possible ways this could interfere with testing replica sets.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 23/Jun/21 ]

Author:

{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}

Message: SERVER-56010 Wait for primary services to finish rebuilding before completing replset initialization.

(cherry picked from commit 48e8104223a4ba42bdf22ecf03143c78d757a109)
Branch: v5.0
https://github.com/mongodb/mongo/commit/41720c10856d4b876b7b0c9dcf10a3c14a44d8cb

Comment by Githook User [ 22/Jun/21 ]

Author:

{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}

Message: SERVER-56010 Wait for primary services to finish rebuilding before completing replset initialization.
Branch: master
https://github.com/mongodb/mongo/commit/48e8104223a4ba42bdf22ecf03143c78d757a109

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