Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25205

MongoDB overwrites version field in replSetReconfig if "force" is given

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.7
    • Component/s: None
    • None
    • ALL
    • Hide

      Run replSetReconfig with an explicit version in the config document
      Note in the replSetStatus it is actually a much larger and random number.

      Show
      Run replSetReconfig with an explicit version in the config document Note in the replSetStatus it is actually a much larger and random number.
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      When trying to explicitly set the version of the replica set configuration the server will overwrite the version specified by the operator if the "force" flag is given.

      Instead the version number will be incremented randomly by a relatively large number.

      This behaviour is undesirable if one intends to build a system to automatically update the replica set configuration as in these cases it's important the external system is able to set the version to a known number. It is the job of that external system to ensure it's monotonically increasing etc.

      Ideally the behaviour would be changed to not overwrite operator input and instead like the non-force path should return an error if the version number is less than the old version.

      If I have missed something vital that explains why the server does this I would love to hear the rational behind this behaviour.

            Assignee:
            Unassigned Unassigned
            Reporter:
            josephglanville Joseph Glanville
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: