Determine correct ranges for priority in replicaSet configuration

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.2.0-rc0
    • Component/s: Replication
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Matt Dannenberg (Inactive)
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: