Document or simplify force and skipSafetyChecks flags in _doReplSetReconfig

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Repl 2025-12-22
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, ReplicationCoordinatorImpl::_doReplSetReconfig takes in two flags: a force flag that enables/disables force reconfig (which skips some safety checks), and a skipSafetyChecks flag that skips a set of safety checks which is neither:

      As a result, we have four different combinations of reconfig safety options, and it isn't clear which checks I can expect to be enabled/disabled from the flags used:

      https://github.com/10gen/mongo/blob/gitpushjoe/SERVER-114075/src/mongo/db/repl/replication_coordinator_impl.h?plain=1#L1766-L1773

          /*
           * Performs the replica set reconfig procedure. Certain consensus safety checks are omitted when
           * either 'force' or 'skipSafetyChecks' are true.
           */
          Status _doReplSetReconfig(OperationContext* opCtx,
                                    GetNewConfigFn getNewConfig,
                                    bool force,
                                    bool skipSafetyChecks);
      

      We should either expand the documentation to specify which safety checks skipSafetyChecks refers to or implement a better design.

            Assignee:
            Joseph Obaraye
            Reporter:
            Joseph Obaraye
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: