[SERVER-51828] Fix assertion around number of elections in priority_takeover_one_node_higher_priority.js Created: 23/Oct/20  Updated: 29/Oct/23  Resolved: 30/Oct/20

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

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

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2020-11-02
Participants:
Linked BF Score: 24

 Description   

In SERVER-50611, we modified this test to allow for multiple priority takeovers to occur in the test (while we only expect/induce one priority takeover to occur, we relaxed the assertion from exactly one occurs => at least one occurs, as slow elections might lead to multiple takeovers happening; see the linked ticket).

But the relaxed assertion is backwards; it asserts that the expected # of primary takeovers is >= the actual number, when in fact the actual number may be higher due to slow elections. This assertion should be reversed so actual # takeovers >= expected #.



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

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com'}

Message: SERVER-51828 Fix assertion around number of elections in priority_takeover_one_node_higher_priority.js
Branch: master
https://github.com/mongodb/mongo/commit/5174d67e7146a28f73a124885907fd213ade0be3

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