[SERVER-36327] Use stepUp command instead of priorities as a way to designate primary nodes in tags.js Created: 27/Jul/18  Updated: 29/Oct/23  Resolved: 30/Jul/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.0.2, 4.1.2, 3.6 Required

Type: Bug Priority: Major - P3
Reporter: William Schultz (Inactive) Assignee: William Schultz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-51157 Improve stability of TagsTest in v3.6 Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Participants:
Linked BF Score: 8

 Description   

The tags.js test currently uses priorities as a way to get certain nodes to step up as primary in different points in the test. This makes the initial startup and configuration phase unstable, since it can cause an existing, lower priority primary to step down while another node is syncing from it. We can replace this technique by using replSetStepUp to force nodes to become primary throughout the test, and remove the uneven priorities between nodes.



 Comments   
Comment by Githook User [ 14/Aug/18 ]

Author:

{'username': 'will62794', 'email': 'william.schultz@mongodb.com', 'name': 'William Schultz'}

Message: SERVER-36327 Use replSetStepUp command to ensure primary nodes in tags.js library

Utilize the replSetStepUp command as a way to make certain nodes primary
in the tags.js tests, as opposed to relying on priority takeovers to
elect higher priority nodes. This makes the test more stable during
the initial setup and re-config phase i.e. priority takeovers should no
longer cause unwanted stepdowns while nodes are in the middle of initial
sync.

(cherry picked from commit 1e4ac5590fb80908b4ebd4a84f9fcd2d02dfb63f)
Branch: v4.0
https://github.com/mongodb/mongo/commit/e5991e3583f03dd8de8237f7663232a47911f5f9

Comment by Githook User [ 30/Jul/18 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-36327 Use replSetStepUp command to ensure primary nodes in tags.js library

Utilize the replSetStepUp command as a way to make certain nodes primary
in the tags.js tests, as opposed to relying on priority takeovers to
elect higher priority nodes. This makes the test more stable during
the initial setup and re-config phase i.e. priority takeovers should no
longer cause unwanted stepdowns while nodes are in the middle of initial
sync.
Branch: master
https://github.com/mongodb/mongo/commit/1e4ac5590fb80908b4ebd4a84f9fcd2d02dfb63f

Comment by William Schultz (Inactive) [ 27/Jul/18 ]

The goal of the tags test is not to test priority takeover. We seem to have reasonable integration test coverage of priority takeovers elsewhere i.e.

  • jstests/replsets/priority_takeover_one_node_higher_priority.js
  • jstests/replsets/priority_takeover_cascading_priorities.js
  • jstests/replsets/priority_takeover_two_nodes_equal_priority.js
  • jstests/replsets/replsets_priority1.js
Comment by Max Hirschhorn [ 27/Jul/18 ]

william.schultz, are we confident in our testing of priority takeovers in other JavaScript tests to lose this implicit coverage with jstests/replsets/tags.js?

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