[SERVER-45350] Use awaitMajorityCommitted in standalone_replication_recovery_idempotent.js Created: 03/Jan/20  Updated: 29/Oct/23  Resolved: 03/Jan/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.2.3, 4.3.3

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Repl 2020-01-13
Participants:
Linked BF Score: 12

 Description   

awaitReplication only waits for the lastAppliedOpTime. After calling awaitReplication, the commit point could still be behind. For prepared transactions testing, we have awaitMajorityCommitted which waits for the commit point as known by the primary.

We should change standalone_replication_recovery_idempotent.js to use awaitMajorityCommitted.

And it seems that it is a common mistake to use awaitReplication in prepared transactions testings, maybe we could also move the logic in awaitMajorityCommitted to awaitReplication to have it also wait for the commit point.



 Comments   
Comment by Githook User [ 03/Jan/20 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-45350: Use awaitMajorityCommitted in standalone_replication_recovery_idempotent.js

(cherry picked from commit 154f268c9ec40213d5b0d258fff3f50e311b1ccb)
Branch: v4.2
https://github.com/mongodb/mongo/commit/6474ab0ffa9bd0fcfe526bbb07a84100b79d34fb

Comment by Githook User [ 03/Jan/20 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-45350: Use awaitMajorityCommitted in standalone_replication_recovery_idempotent.js
Branch: master
https://github.com/mongodb/mongo/commit/154f268c9ec40213d5b0d258fff3f50e311b1ccb

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