[SERVER-48958] Unwin-able primary takeovers can be scheduled on priority:0 nodes Created: 18/Jun/20  Updated: 29/Oct/23  Resolved: 28/Mar/23

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Judah Schvimer Assignee: Kaitlin Mahar
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-03-06, Repl 2023-03-20, Repl 2023-04-03
Participants:

 Description   

_shouldTakeOverPrimary doesn't check if a node is priority:0 before scheduling a priority or catchup takeover. Later on, it will choose not to stand for election. This is confusing in the logs and wastes a very tiny amount of resources on the node.

This can clearly be seen in this test.



 Comments   
Comment by Githook User [ 28/Mar/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-48958 Prevent scheduling catchup takeovers on priority:0 nodes
Branch: master
https://github.com/mongodb/mongo/commit/1693f194a25104f0a4ffb0caf06e95dc9908cde3

Comment by Judah Schvimer [ 22/Jun/20 ]

It still may be good for a relatively new engineer, but I agree, it's not trivial.

Comment by Siyuan Zhou [ 22/Jun/20 ]

Perhaps there are more things we need to check than just priority. TopologyCoordinator::_getMyUnelectableReason() seems the right one to call, however it's a private function. Not sure if this is a neweng ticket.

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