[SERVER-14308] replace replsets/majority.js with c++ unit tests covering the same functionality Created: 19/Jun/14  Updated: 11/Jul/16  Resolved: 20/Oct/14

Status: Closed
Project: Core Server
Component/s: Replication, Testing Infrastructure
Affects Version/s: 2.7.2
Fix Version/s: 2.7.8

Type: Task Priority: Major - P3
Reporter: Matt Dannenberg Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-14403 Change w:majority write concern to in... Closed
Participants:
Linked BF Score: 0

 Description   

majority.js has been flaky since we removed the ability to have zero vote arbiters. The test cannot really be fixed, but equivalent testing can be done in other places.



 Comments   
Comment by Eric Milkie [ 08/Oct/14 ]

I see.
As long as you believe we already have sufficient coverage for testing the majority calculation in the new system, there is nothing further to do for this ticket.

Comment by Matt Dannenberg [ 08/Oct/14 ]

The flapping occurred three and a half months ago and we fixed it by deleting the test... If I recall correctly, once we'd removed support for non-voting arbiters, the primary would stepdown when the test didn't expect it to. So the flapping was a race between the primary stepping down because it couldn't see a majority of nodes and the actual functionality of the test (inserts with write concerns).

Comment by Eric Milkie [ 08/Oct/14 ]

I understand that the definition is wrong, but I don't understand why the test doesn't fail all the time then. Which part of the test mechanics is causing flapping?

Comment by Matt Dannenberg [ 06/Oct/14 ]

I took a look at majority.js again and I believe it is testing the flawed definition of majority, which we intend to correct for 2.8. The test starts with a seven node set containing four arbiters and ensure that taking all the arbiters offline does not prevent "majority" write concern. Then, it then removes two arbiter nodes from the set and confirms that all three non-arbiter nodes are still needed for write concern "majority". It then network partitions one of the three non-arbiter votes from the other two and ensures write concern cannot be satisfied until they are rejoined. All of this depends on an incorrect definition of majority.

Comment by Githook User [ 19/Jun/14 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-14308 eliminate majority.js
Branch: master
https://github.com/mongodb/mongo/commit/4fc19b1e98165ee1518c568a6ab9d5a1fece8db4

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