[SERVER-43398] Fix race in replSetGetStatus_new_term_oplog_entry_fields.js Created: 20/Sep/19  Updated: 29/Oct/23  Resolved: 23/Sep/19

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

Type: Bug Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Samyukta Lanka
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, v4.0
Sprint: Repl 2019-09-23, Repl 2019-10-07
Participants:
Linked BF Score: 7

 Description   

In trying to test that we correctly report the time the new term oplog entry was majority committed. We call awaitReplication before checking the metrics, but awaitReplication doesn't guarantee that the majority commit point has advanced yet. Since there is a race there, we should use awaitLastOpCommitted instead.



 Comments   
Comment by Githook User [ 30/Oct/19 ]

Author:

{'name': 'Samyukta Lanka', 'username': 'lankas', 'email': 'samy.lanka@mongodb.com'}

Message: SERVER-43398 Fix race in replSetGetStatus_new_term_oplog_entry_fields.js

(cherry picked from commit 5f0fa89444bf7bdffee8f9107f803d6a00970dc8)
Branch: v4.0
https://github.com/mongodb/mongo/commit/7871cec506d3c3ce55522c1f96dfc7c1090eb8ba

Comment by Githook User [ 26/Sep/19 ]

Author:

{'username': 'lankas', 'email': 'samy.lanka@mongodb.com', 'name': 'Samyukta Lanka'}

Message: SERVER-41508 Track the time the new term oplog entry was majority committed in replSetStatus on primaries

(cherry picked from commit 6d3a44af67e206e1d61cfd904ef62c0ba015805a)

SERVER-43398 Fix race in replSetGetStatus_new_term_oplog_entry_fields.js

(cherry picked from commit 5f0fa89444bf7bdffee8f9107f803d6a00970dc8)
Branch: v4.2
https://github.com/mongodb/mongo/commit/39ccddf56533f16c855a78d0fdb1a721672b77d9

Comment by Githook User [ 23/Sep/19 ]

Author:

{'name': 'Samyukta Lanka', 'username': 'lankas', 'email': 'samy.lanka@mongodb.com'}

Message: SERVER-43398 Fix race in replSetGetStatus_new_term_oplog_entry_fields.js
Branch: master
https://github.com/mongodb/mongo/commit/5f0fa89444bf7bdffee8f9107f803d6a00970dc8

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