<section>
 <h1 class="contains-headerlink leafygreen-ui-41fr9s" weight="medium">
  replSetReconfig
  <a class="headerlink leafygreen-ui-1kepx47" href="#replsetreconfig" title="Permalink to this heading">
   <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
    <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
    </path>
    <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
    </path>
   </svg>
   <div class="css-1btu0w3 evvkmar0" id="replsetreconfig">
   </div>
  </a>
 </h1>
 <div class="leafygreen-ui-a5yxub">
  <p class="css-1cmx2d4 ef7gu8j0">
   On this page
  </p>
  <ul class="css-1qb0mst ef7gu8j1">
   <li class="leafygreen-ui-1e7a0ei">
    <a class="lg-ui-0001 leafygreen-ui-e98ikf" href="#definition" target="_self">
     <span>
      Definition
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#compatibility" target="_self">
     <span>
      Compatibility
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#syntax" target="_self">
     <span>
      Syntax
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#command-fields" target="_self">
     <span>
      Command Fields
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#behavior" target="_self">
     <span>
      Behavior
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#additional-information" target="_self">
     <span>
      Additional Information
     </span>
    </a>
   </li>
  </ul>
 </div>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Definition
   <a class="headerlink leafygreen-ui-1kepx47" href="#definition" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="definition">
    </div>
   </a>
  </h2>
  <dl class="dbcommand">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     replSetReconfig
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-dbcommand-dbcmd.replSetReconfig" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-dbcommand-dbcmd.replSetReconfig">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     The
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        replSetReconfig
       </code>
      </span>
     </a>
     administrative command modifies the
configuration of an existing replica set. You can use this command to
add and remove members, and to alter the options set on existing
members. You must run this command on the
     <code class="leafygreen-ui-1l06pbn">
      admin
     </code>
     database of the
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
      primary
     </a>
     replica set member.
    </p>
    <div class="leafygreen-ui-13vw3ie" role="note">
     <h2 class="leafygreen-ui-1fn4p2b">
      Tip
     </h2>
     <div class="leafygreen-ui-9mycqc">
      <p class="leafygreen-ui-1kp3ins">
       In
       <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#std-program-mongosh" target="_self">
        <span>
         <code class="leafygreen-ui-1l06pbn">
          mongosh
         </code>
        </span>
       </a>
       , this command can also be run through the
       <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
        <code class="leafygreen-ui-1l06pbn">
         rs.reconfig()
        </code>
       </a>
       helper method
       <!-- -->
       .
      </p>
      <p class="leafygreen-ui-1kp3ins">
       Helper methods are convenient for
       <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#std-program-mongosh" target="_self">
        <span>
         <code class="leafygreen-ui-1l06pbn">
          mongosh
         </code>
        </span>
       </a>
       users, but they may not
return the same level of information as database commands.  In cases where
the convenience is not needed or the additional return fields are required,
use the database command.
      </p>
     </div>
    </div>
   </dd>
  </dl>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Compatibility
   <a class="headerlink leafygreen-ui-1kepx47" href="#compatibility" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="compatibility">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   This command is available in deployments hosted in the following environments:
  </p>
  <ul class="leafygreen-ui-rioki0">
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/atlas?tck=docs_server" target="_self">
      <span>
       MongoDB Atlas
      </span>
     </a>
     : The fully
managed service for MongoDB deployments in the cloud
    </p>
   </li>
  </ul>
  <div class="leafygreen-ui-85da11" role="note">
   <h2 class="leafygreen-ui-1ac4g5h">
    Important
   </h2>
   <div class="leafygreen-ui-9mycqc">
    <p class="leafygreen-ui-1kp3ins">
     This command is not supported in M0, M2, M5, and M10+ clusters.
For more information, see
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/atlas/unsupported-commands/" target="_self">
      <span>
       Unsupported Commands
       <!-- -->
       .
      </span>
     </a>
    </p>
   </div>
  </div>
  <ul class="leafygreen-ui-rioki0">
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/install-enterprise/#std-label-install-mdb-enterprise">
      MongoDB Enterprise
     </a>
     : The
subscription-based, self-managed version of MongoDB
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/install-community/#std-label-install-mdb-community-edition">
      MongoDB Community
     </a>
     : The
source-available, free-to-use, and self-managed version of MongoDB
    </p>
   </li>
  </ul>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Syntax
   <a class="headerlink leafygreen-ui-1kepx47" href="#syntax" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="syntax">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   The command has the following syntax:
  </p>
  <script class="structured_data" type="application/ld+json">
   {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.adminCommand(\n   {\n     replSetReconfig: &lt;new_config_document&gt;,\n     force: &lt;boolean&gt;,\n     maxTimeMS: &lt;int&gt;\n    }\n )","programmingLanguage":"JavaScript"}
  </script>
  <div class="css-16lmvu9">
   <div class="leafygreen-ui-196mwvg">
    <div class="leafygreen-ui-yzcs8i">
     <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-title lg-highlight-function">adminCommand</span>(</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">     <span class="lg-highlight-attr">replSetReconfig</span>: &lt;<!-- -->new_config_document<!-- -->&gt;<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">     <span class="lg-highlight-attr">force</span>: &lt;<!-- -->boolean<!-- -->&gt;<!-- -->,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">     <span class="lg-highlight-attr">maxTimeMS</span>: &lt;<!-- -->int<!-- -->&gt;</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <!-- -->}</td></tr><tr class=""><td class="leafygreen-ui-7razhx"> )</td></tr></tbody></table></code></pre>
     <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
      <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
       <div class="leafygreen-ui-xhlipt">
        <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
         <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
         </path>
        </svg>
       </div>
      </button>
     </div>
    </div>
   </div>
  </div>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Command Fields
   <a class="headerlink leafygreen-ui-1kepx47" href="#command-fields" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="command-fields">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   The command takes the following optional field:
  </p>
  <div class="leafygreen-ui-skkc39" tabindex="0">
   <table class="leafygreen-ui-hr8lsv">
    <colgroup>
     <col style="width:20%"/>
     <col style="width:80%"/>
    </colgroup>
    <thead class="leafygreen-ui-a9ho40">
     <tr data-testid="leafygreen-ui-header-row">
      <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Field
        </div>
       </div>
      </th>
      <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
       <div class="leafygreen-ui-ui0te9">
        <div>
         Description
        </div>
       </div>
      </th>
     </tr>
    </thead>
    <tbody>
     <tr class="">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <span class="leafygreen-ui-1qnjd6d" id="std-label-replSetReconfig-cmd-force">
         </span>
         <p class="leafygreen-ui-1kp3ins">
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-force" target="_self">
           <span>
            force
           </span>
          </a>
         </p>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <p class="leafygreen-ui-1kp3ins">
          Defaults to
          <code class="leafygreen-ui-1l06pbn">
           false
          </code>
          . Specify
          <code class="leafygreen-ui-1l06pbn">
           true
          </code>
          to force the
available replica set members to accept the new configuration.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          Force reconfiguration can result in unexpected or
undesired behavior, including
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-rollbacks/#std-label-replica-set-rollbacks">
           rollback
          </a>
          of
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
           <code class="leafygreen-ui-1l06pbn">
            "majority"
           </code>
          </a>
          committed writes.
         </p>
        </div>
       </div>
      </td>
     </tr>
     <tr class="">
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         <span class="leafygreen-ui-1qnjd6d" id="std-label-replSetReconfig-cmd-maxTimeMS">
         </span>
         <p class="leafygreen-ui-1kp3ins">
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-maxTimeMS" target="_self">
           <span>
            maxTimeMS
           </span>
          </a>
         </p>
        </div>
       </div>
      </td>
      <td class="leafygreen-ui-1drjk7h">
       <div class="leafygreen-ui-1n4j8xf">
        <div>
         Optional. Specifies a cumulative time limit in milliseconds
for processing the
         <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
          <span>
           <code class="leafygreen-ui-1l06pbn">
            replSetReconfig
           </code>
          </span>
         </a>
         . By default,
         <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
          <span>
           <code class="leafygreen-ui-1l06pbn">
            replSetReconfig
           </code>
          </span>
         </a>
         waits indefinitely for the
replica configuration to propagate to a majority of replica
set members. Setting
         <code class="leafygreen-ui-1l06pbn">
          maxTimeMS
         </code>
         may result
in the operation failing
         <em>
          before
         </em>
         it can apply the new
configuration. See
         <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-majority-install" target="_self">
          <span>
           Reconfiguration Waits Until a Majority of Members Install the Replica Configuration
          </span>
         </a>
         for more information.
        </div>
       </div>
      </td>
     </tr>
    </tbody>
   </table>
  </div>
  <p class="leafygreen-ui-1kp3ins">
   You may also run
   <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
    <span>
     <code class="leafygreen-ui-1l06pbn">
      replSetReconfig
     </code>
    </span>
   </a>
   with the shell's
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
    <code class="leafygreen-ui-1l06pbn">
     rs.reconfig()
    </code>
   </a>
   method.
  </p>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Behavior
   <a class="headerlink leafygreen-ui-1kepx47" href="#behavior" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="behavior">
    </div>
   </a>
  </h2>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Global Write Concern
    <a class="headerlink leafygreen-ui-1kepx47" href="#global-write-concern" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="global-write-concern">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Starting in MongoDB 5.0, you must explicitly set the global default
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-write-concern">
     write concern
    </a>
    before attempting to reconfigure a
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-replica-set">
     replica set
    </a>
    with a
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#std-label-replica-set-configuration-settings">
     configuration
    </a>
    that would change the implicit default write concern. To set the global
default write concern, use the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setDefaultRWConcern/#mongodb-dbcommand-dbcmd.setDefaultRWConcern">
     <code class="leafygreen-ui-1l06pbn">
      setDefaultRWConcern
     </code>
    </a>
    command.
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    <code class="leafygreen-ui-1l06pbn">
     term
    </code>
    Replica Configuration Field
    <a class="headerlink leafygreen-ui-1kepx47" href="#term-replica-configuration-field" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="term-replica-configuration-field">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    The
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.term">
     <code class="leafygreen-ui-1l06pbn">
      term
     </code>
    </a>
    field is set by the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
     primary
    </a>
    replica set member.
The primary ignores the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.term">
     <code class="leafygreen-ui-1l06pbn">
      term
     </code>
    </a>
    field if set explicitly in the
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    operation.
   </p>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-replSetReconfig-cmd-single-node">
   </span>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Reconfiguration Can Add or Remove No More than One Voting Member at a Time
    <a class="headerlink leafygreen-ui-1kepx47" href="#reconfiguration-can-add-or-remove-no-more-than-one-voting-member-at-a-time" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="reconfiguration-can-add-or-remove-no-more-than-one-voting-member-at-a-time">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    by default allows adding or
removing no more than
    <code class="leafygreen-ui-1l06pbn">
     1
    </code>
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes">
     <code class="leafygreen-ui-1l06pbn">
      voting
     </code>
    </a>
    member at a time. For example, a new configuration can make at most
    <em>
     one
    </em>
    of the following changes to the cluster
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes">
     <code class="leafygreen-ui-1l06pbn">
      membership
     </code>
     :
    </a>
   </p>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Adding a new voting replica set member.
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Removing an existing voting replica set member.
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Modifying the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes">
       <code class="leafygreen-ui-1l06pbn">
        votes
       </code>
      </a>
      for an existing replica
set member.
     </p>
    </li>
   </ul>
   <p class="leafygreen-ui-1kp3ins">
    To add or remove multiple voting members, issue a series of
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    operations to add or remove one member at a
time.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    Issuing a
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-force" target="_self">
     <span>
      force
     </span>
    </a>
    reconfiguration
immediately installs the new configuration even if it adds or removes
multiple voting members. Force reconfiguration can cause unexpected
behavior, such as the rollback of
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
     <code class="leafygreen-ui-1l06pbn">
      "majority"
     </code>
    </a>
    committed write operations.
   </p>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-replSetReconfig-cmd-majority-install">
   </span>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Reconfiguration Waits Until a Majority of Members Install the Replica Configuration
    <a class="headerlink leafygreen-ui-1kepx47" href="#reconfiguration-waits-until-a-majority-of-members-install-the-replica-configuration" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="reconfiguration-waits-until-a-majority-of-members-install-the-replica-configuration">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    waits until a majority of voting
replica set members install the new replica configuration before
returning success. A voting member is
    <em>
     any
    </em>
    replica set member where
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes">
     <code class="leafygreen-ui-1l06pbn">
      members[n].votes
     </code>
    </a>
    is
    <code class="leafygreen-ui-1l06pbn">
     1
    </code>
    , including arbiters.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    Replica set members propagate their replica configuration via
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/#std-label-replica-set-heartbeats">
     heartbeats
    </a>
    . Whenever a member learns
of a configuration with a higher
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.version">
     <code class="leafygreen-ui-1l06pbn">
      version
     </code>
    </a>
    and
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.term">
     <code class="leafygreen-ui-1l06pbn">
      term
     </code>
    </a>
    , it installs the new configuration. The
reconfiguration process has two distinct 'waiting' phases:
   </p>
   <dl>
    <dt>
     1) Wait for the current configuration to be
     <em>
      committed
     </em>
     before installing the new configuration.
    </dt>
    <dd class="css-1ufxuu7">
     <p class="leafygreen-ui-1kp3ins">
      The "current" configuration refers to the replica configuration in
use by the primary at the time
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         replSetReconfig
        </code>
       </span>
      </a>
      is issued.
     </p>
     <span class="leafygreen-ui-1qnjd6d" id="std-label-replSetReconfig-configuration-committed">
     </span>
     <p class="leafygreen-ui-1kp3ins">
      A configuration is committed when:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        A majority of voting replica set members have installed the
current configuration,
        <em>
         and
        </em>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        All writes which were
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
         <code class="leafygreen-ui-1l06pbn">
          "majority"
         </code>
        </a>
        committed in
the previous configuration have also replicated to a majority in
the current configuration.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      Typically, the current configuration has already been installed on
a majority of voting replica set members. However, the majority
committed writes in the previous configuration may not all be
committed in the current configuration.
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.secondaryDelaySecs">
       <code class="leafygreen-ui-1l06pbn">
        Delayed
       </code>
      </a>
      members
      <em>
       or
      </em>
      members that are
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.printSecondaryReplicationInfo/#mongodb-method-rs.printSecondaryReplicationInfo">
       <code class="leafygreen-ui-1l06pbn">
        lagging behind
       </code>
      </a>
      the
primary can increase the time spent in this phase.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If the operation was issued with a
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-maxTimeMS" target="_self">
       <span>
        maxTimeMS
       </span>
      </a>
      limit
      <em>
       and
      </em>
      the operation exceeds the limit while waiting, the operation
returns an error and discard the new configuration. The
limit is
      <em>
       cumulative
      </em>
      and does not reset after proceeding to
the next phase.
     </p>
    </dd>
    <dt>
     2) Wait for a majority of voting members in the new configuration to install the new configuration.
    </dt>
    <dd class="css-1ufxuu7">
     <p class="leafygreen-ui-1kp3ins">
      The "new" configuration refers to the replica configuration
specified to
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         replSetReconfig
        </code>
       </span>
      </a>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The primary installs and begins using the new replica
configuration before propagating the configuration to the
remaining replica set members. The operation only waits for a
majority of voting members to install the new configuration, and
does not require waiting for the new configuration to be
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-configuration-committed" target="_self">
       <span>
        committed
        <!-- -->
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If the operation was issued with a
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-maxTimeMS" target="_self">
       <span>
        maxTimeMS
       </span>
      </a>
      limit
      <em>
       and
      </em>
      the operation exceeds the limit while waiting, the operation
returns an error
      <em>
       but
      </em>
      continues using and propagating the new
configuration.
     </p>
    </dd>
   </dl>
   <p class="leafygreen-ui-1kp3ins">
    Issuing a
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-label-replSetReconfig-cmd-force" target="_self">
     <span>
      force
     </span>
    </a>
    reconfiguration
immediately installs the new configuration regardless of the
commitment status of the previous configuration. Force
reconfiguration can cause unexpected behavior, such as the
rollback of
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
     <code class="leafygreen-ui-1l06pbn">
      "majority"
     </code>
    </a>
    committed write operations.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    To check the commitment status of the current replica configuration,
issue
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetGetConfig/#mongodb-dbcommand-dbcmd.replSetGetConfig">
     <code class="leafygreen-ui-1l06pbn">
      replSetGetConfig
     </code>
    </a>
    with the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetGetConfig/#std-label-replSetGetConfig-commitmentStatus">
     commitmentStatus
    </a>
    parameter
on the replica set
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
     primary
     <!-- -->
     .
    </a>
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Automatic Reconfiguration for New Voting Replica Set Members
    <a class="headerlink leafygreen-ui-1kepx47" href="#automatic-reconfiguration-for-new-voting-replica-set-members" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="automatic-reconfiguration-for-new-voting-replica-set-members">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Starting in MongoDB 5.0, a newly added secondary does not count as a
voting member and cannot be elected until it has reached the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-states/#mongodb-replstate-replstate.SECONDARY">
     <code class="leafygreen-ui-1l06pbn">
      SECONDARY
     </code>
    </a>
    state.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    When a new voting node is added to a replica set,
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    will internally add a
    <code class="leafygreen-ui-1l06pbn">
     newlyAdded
    </code>
    field to the node's configuration. Nodes with the
    <code class="leafygreen-ui-1l06pbn">
     newlyAdded
    </code>
    field
do not count towards the current number of voting nodes. When initial
sync completes and the node reaches
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-states/#mongodb-replstate-replstate.SECONDARY">
     <code class="leafygreen-ui-1l06pbn">
      SECONDARY
     </code>
    </a>
    state, the
    <code class="leafygreen-ui-1l06pbn">
     newlyAdded
    </code>
    field is automatically removed.
   </p>
   <div class="leafygreen-ui-15mdk4" role="note">
    <h2 class="leafygreen-ui-6n7b7d">
     Note
    </h2>
    <div class="leafygreen-ui-9mycqc">
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Configurations that attempt to add a field named
        <code class="leafygreen-ui-1l06pbn">
         newlyAdded
        </code>
        will error even if run with
        <code class="leafygreen-ui-1l06pbn">
         { force: true }
        </code>
        .
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        If an existing node has a
        <code class="leafygreen-ui-1l06pbn">
         newlyAdded
        </code>
        field, using
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
         <code class="leafygreen-ui-1l06pbn">
          rs.reconfig()
         </code>
        </a>
        to change the configuration will not
remove the
        <code class="leafygreen-ui-1l06pbn">
         newlyAdded
        </code>
        field. The
        <code class="leafygreen-ui-1l06pbn">
         newlyAdded
        </code>
        field will be
appended to the user provided configuration.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetGetConfig/#mongodb-dbcommand-dbcmd.replSetGetConfig">
         <code class="leafygreen-ui-1l06pbn">
          replSetGetConfig
         </code>
        </a>
        will remove any
        <code class="leafygreen-ui-1l06pbn">
         newlyAdded
        </code>
        fields
from its output. If you would like to see any
        <code class="leafygreen-ui-1l06pbn">
         newlyAdded
        </code>
        fields, you can query the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/local-database/#mongodb-data-local.system.replset">
         <code class="leafygreen-ui-1l06pbn">
          local.system.replset
         </code>
        </a>
        collection
directly.
       </p>
      </li>
     </ul>
    </div>
   </div>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Access Control
    <a class="headerlink leafygreen-ui-1kepx47" href="#access-control" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="access-control">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    To run the command on deployments that enforce
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/authorization/">
     access
control
    </a>
    , the user must have
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/privilege-actions/#mongodb-authaction-replSetConfigure">
     <code class="leafygreen-ui-1l06pbn">
      replSetConfigure
     </code>
    </a>
    privilege action on the cluster
resource. The
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/built-in-roles/#mongodb-authrole-clusterManager">
     <code class="leafygreen-ui-1l06pbn">
      clusterManager
     </code>
    </a>
    built-in role, available in
the
    <code class="leafygreen-ui-1l06pbn">
     admin
    </code>
    database, provides the required privileges for this
command.
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Locking Behavior
    <a class="headerlink leafygreen-ui-1kepx47" href="#locking-behavior" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="locking-behavior">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    obtains a special mutually
exclusive lock to prevent more than one
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    operation from occurring at the same
time.
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Mixed Version Replica Set
    <a class="headerlink leafygreen-ui-1kepx47" href="#mixed-version-replica-set" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mixed-version-replica-set">
     </div>
    </a>
   </h3>
   <div class="leafygreen-ui-1sjx7ru" role="note">
    <h2 class="leafygreen-ui-29m78u">
     Warning
    </h2>
    <div class="leafygreen-ui-9mycqc">
     <p class="leafygreen-ui-1kp3ins">
      Avoid reconfiguring replica sets that contain members of different
MongoDB versions as validation rules may differ across MongoDB versions.
     </p>
    </div>
   </div>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Availability
    <a class="headerlink leafygreen-ui-1kepx47" href="#availability" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="availability">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    A majority of the set's members must be operational for the changes to
propagate properly.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    can trigger the current
primary to step down in some situations. Primary step-down triggers
an
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/#std-label-replica-set-elections">
     election
    </a>
    to select a new
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
     primary
     <!-- -->
     :
    </a>
   </p>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      When the new primary steps up, it increments the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.term">
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </a>
      field to
distinguish configuration changes made on the new primary from changes made
on the previous primary.
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      When the primary steps down, it no longer
closes all client connections; however, writes that were in progress
are killed. For details, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetStepDown/#std-label-replSetStepDown-behavior">
       Behavior
       <!-- -->
       .
      </a>
     </p>
    </li>
   </ul>
   <p class="leafygreen-ui-1kp3ins">
    The median time before a cluster elects a new primary should not
typically exceed 12 seconds, assuming default
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.settings">
     <code class="leafygreen-ui-1l06pbn">
      replica
configuration settings
     </code>
    </a>
    . This includes time required to
mark the primary as
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/replication/#std-label-replication-auto-failover">
     unavailable
    </a>
    and
call and complete an
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/#std-label-replica-set-elections">
     election
    </a>
    .
You can tune this time period by modifying the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.settings.electionTimeoutMillis">
     <code class="leafygreen-ui-1l06pbn">
      settings.electionTimeoutMillis
     </code>
    </a>
    replication configuration
option. Factors such as network latency may extend the time required
for replica set elections to complete, which in turn affects the amount
of time your cluster may operate without a primary. These factors are
dependent on your particular cluster architecture.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    During the election process, the cluster cannot
accept write operations until it elects the new primary.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    Your application connection logic should include tolerance for automatic
failovers and the subsequent elections. MongoDB drivers
can detect the loss of the primary and automatically
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/retryable-writes/#std-label-retryable-writes">
     retry certain write operations
    </a>
    a single time,
providing additional built-in handling of automatic failovers and elections:
   </p>
   <p class="leafygreen-ui-1kp3ins">
    Compatible drivers enable retryable writes by default
   </p>
   <p class="leafygreen-ui-1kp3ins">
    To further reduce potential impact to a production cluster,
reconfigure only during scheduled maintenance periods.
   </p>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    <code class="leafygreen-ui-1l06pbn">
     { force: true }
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#--force--true--" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="--force--true--">
     </div>
    </a>
   </h3>
   <div class="leafygreen-ui-1sjx7ru" role="note">
    <h2 class="leafygreen-ui-29m78u">
     Warning
    </h2>
    <div class="leafygreen-ui-9mycqc">
     <p class="leafygreen-ui-1kp3ins">
      MongoDB does not synchronize a forced replica set reconfiguration
between the replica sets in a cluster. Using
      <code class="leafygreen-ui-1l06pbn">
       { force: true }
      </code>
      can
lead to a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-rollback">
       rollback
      </a>
      of majority-committed writes and an
inconsistent sharded cluster. Exercise caution when you use this option.
     </p>
    </div>
   </div>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Drop Outgoing Connections After Removing a Member
    <a class="headerlink leafygreen-ui-1kepx47" href="#drop-outgoing-connections-after-removing-a-member" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="drop-outgoing-connections-after-removing-a-member">
     </div>
    </a>
   </h3>
   <p class="leafygreen-ui-1kp3ins">
    Using
    <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-dbcommand-dbcmd.replSetReconfig" target="_self">
     <span>
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </span>
    </a>
    to remove a replica set member does
not automatically drop open outgoing connections from other replica
set members to the removed member.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    By default, replica set members wait for 5 minutes before dropping
connections to the removed member. In sharded replica sets, you can
modify this timeout using the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.ShardingTaskExecutorPoolHostTimeoutMS">
     <code class="leafygreen-ui-1l06pbn">
      ShardingTaskExecutorPoolHostTimeoutMS
     </code>
    </a>
    server parameter.
   </p>
   <p class="leafygreen-ui-1kp3ins">
    To immediately drop all outgoing connections from the replica set to
the removed member, run the
    <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/dropConnections/#mongodb-dbcommand-dbcmd.dropConnections">
     <code class="leafygreen-ui-1l06pbn">
      dropConnections
     </code>
    </a>
    administrative command on each remaining member on the replica set:
   </p>
   <script class="structured_data" type="application/ld+json">
    {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"db.adminCommand(\n  {\n    \"dropConnections\" : 1,\n    \"hostAndPort\" : [\n      \"&lt;hostname&gt;:&lt;port&gt;\"\n    ]\n  }\n)","programmingLanguage":"JavaScript"}
   </script>
   <div class="css-16lmvu9">
    <div class="leafygreen-ui-196mwvg">
     <div class="leafygreen-ui-yzcs8i">
      <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">db.<span class="lg-highlight-title lg-highlight-function">adminCommand</span>(</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <!-- -->{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-string">"dropConnections"</span> <!-- -->: <span class="lg-highlight-number">1</span>,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    <span class="lg-highlight-string">"hostAndPort"</span> <!-- -->: <!-- -->[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      <span class="lg-highlight-string">"&lt;hostname&gt;:&lt;port&gt;"</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">    ]</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">)</td></tr></tbody></table></code></pre>
      <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
       <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
        <div class="leafygreen-ui-xhlipt">
         <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
          <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
          </path>
         </svg>
        </div>
       </button>
      </div>
     </div>
    </div>
   </div>
   <p class="leafygreen-ui-1kp3ins">
    Replace
    <code class="leafygreen-ui-1l06pbn">
     &lt;hostname&gt;
    </code>
    and
    <code class="leafygreen-ui-1l06pbn">
     &lt;port&gt;
    </code>
    with those of the removed
member.
   </p>
   <div class="leafygreen-ui-1sjx7ru" role="note">
    <h2 class="leafygreen-ui-29m78u">
     Warning
    </h2>
    <div class="leafygreen-ui-9mycqc">
     <p class="leafygreen-ui-1kp3ins">
      Starting in MongDB 5.0,
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://en.wikipedia.org/wiki/Split-horizon_DNS" rel="noopener noreferrer">
       <span>
        split horizon DNS
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      nodes that are
only configured with an IP address fail startup validation and
report an error. See
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.disableSplitHorizonIPCheck">
       <code class="leafygreen-ui-1l06pbn">
        disableSplitHorizonIPCheck
       </code>
       .
      </a>
     </p>
    </div>
   </div>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Member Priority and Votes
    <a class="headerlink leafygreen-ui-1kepx47" href="#member-priority-and-votes" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="member-priority-and-votes">
     </div>
    </a>
   </h3>
   <ul class="leafygreen-ui-rioki0">
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Members with
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.priority">
       <code class="leafygreen-ui-1l06pbn">
        priority
       </code>
      </a>
      greater than 0 cannot have
0
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes">
       <code class="leafygreen-ui-1l06pbn">
        votes
       </code>
       .
      </a>
     </p>
    </li>
    <li class="leafygreen-ui-d7p7b6">
     <p class="leafygreen-ui-1kp3ins">
      Non-voting (i.e.
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.votes">
       <code class="leafygreen-ui-1l06pbn">
        votes
       </code>
      </a>
      is
      <code class="leafygreen-ui-1l06pbn">
       0
      </code>
      ) members must have
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#mongodb-rsconf-rsconf.members-n-.priority">
       <code class="leafygreen-ui-1l06pbn">
        priority
       </code>
      </a>
      of 0.
     </p>
    </li>
   </ul>
  </section>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Additional Information
   <a class="headerlink leafygreen-ui-1kepx47" href="#additional-information" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="additional-information">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/#std-label-replSetGetConfig-output">
    Replica Set Configuration Fields
   </a>
   ,
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-configuration/">
    Self-Managed Replica Set Configuration
   </a>
   ,
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
    <code class="leafygreen-ui-1l06pbn">
     rs.reconfig()
    </code>
   </a>
   , and
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.conf/#mongodb-method-rs.conf">
    <code class="leafygreen-ui-1l06pbn">
     rs.conf()
    </code>
    .
   </a>
  </p>
 </section>
</section>
