[SERVER-6697] Determine correct ranges for priority in replicaSet configuration Created: 02/Aug/12  Updated: 10/Dec/14  Resolved: 02/Jun/14

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: elections
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-3518 replicaset priority limits are incorr... Closed
Operating System: ALL
Participants:

 Description   

In ReplSetConfig::MemberCfg::check:

mchk(priority >= 0 && priority <= 1000); // <-- there is also a uassert below which makes this redundant?
mchk(votes <= 100); // votes >= 0 because it is unsigned
uassert(13419, "priorities must be between 0.0 and 100.0", priority >= 0.0 && priority <= 100.0);

Note that the docs says priority is 0 <= x <= 1000, which contradicts the uassert above.

http://docs.mongodb.org/manual/reference/replica-configuration/?highlight=priority#members[n].priority



 Comments   
Comment by Matt Dannenberg [ 02/Jun/14 ]

The problem has now flipped. All the checks in the code base seem to be between 0 and 1000, but the docs claim between it's 0 and 100.0. Filing a docs ticket.

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