<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:54:20 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-20473] calling setMaintenanceMode(true) while running for election crashes server</title>
                <link>https://jira.mongodb.org/browse/SERVER-20473</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="230335">SERVER-20473</key>
            <summary>calling setMaintenanceMode(true) while running for election crashes server</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="benety.goh@mongodb.com">Benety Goh</assignee>
                                    <reporter username="benety.goh@mongodb.com">Benety Goh</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Sep 2015 19:57:45 +0000</created>
                <updated>Wed, 25 Jan 2017 22:00:04 +0000</updated>
                            <resolved>Fri, 18 Sep 2015 15:40:09 +0000</resolved>
                                                    <fixVersion>3.0.7</fixVersion>
                    <fixVersion>3.1.9</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="1038832" author="xgen-internal-githook" created="Mon, 21 Sep 2015 20:50:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;benety&apos;, u&apos;name&apos;: u&apos;Benety Goh&apos;, u&apos;email&apos;: u&apos;benety@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; ReplicationCoordinator::setMaintenanceMode() should fail if the node is currently running for election&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 46e6c6be50a33c54127ea4f6364efdd23f738c02)&lt;/p&gt;

&lt;p&gt;Conflicts:&lt;br/&gt;
	src/mongo/db/repl/replication_coordinator_impl.cpp&lt;br/&gt;
Branch: v3.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c164b84736f186c3d5e82d6845df89db1e9360f1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c164b84736f186c3d5e82d6845df89db1e9360f1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1037109" author="xgen-internal-githook" created="Fri, 18 Sep 2015 18:29:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;benety&apos;, u&apos;name&apos;: u&apos;Benety Goh&apos;, u&apos;email&apos;: u&apos;benety@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; ReplicationCoordinator::setMaintenanceMode should return NotSecondary (instead of NotMaster) when invoked as a candidate&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/26192ab0ea2d44e68c7506d38515b6f7eb478021&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/26192ab0ea2d44e68c7506d38515b6f7eb478021&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1036937" author="benety.goh" created="Fri, 18 Sep 2015 15:39:51 +0000"  >&lt;p&gt;For backport, this is the commit to cherry-pick into 3.0:&lt;/p&gt;

&lt;p&gt;commit 46e6c6be50a33c54127ea4f6364efdd23f738c02&lt;br/&gt;
Author: Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
Date:   Thu Sep 17 15:59:34 2015 -0400&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; ReplicationCoordinator::setMaintenanceMode() should fail if the node is currently running for election&lt;/p&gt;

&lt;p&gt;diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp&lt;br/&gt;
index 291b591..a1b9e55 100644&lt;br/&gt;
&amp;#8212; a/src/mongo/db/repl/replication_coordinator_impl.cpp&lt;br/&gt;
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp&lt;br/&gt;
@@ -1677,6 +1677,11 @@ void ReplicationCoordinatorImpl::_setMaintenanceMode_helper(&lt;br/&gt;
         return;&lt;br/&gt;
     }&lt;/p&gt;

&lt;p&gt;+    if (_topCoord-&amp;gt;getRole() == TopologyCoordinator::Role::candidate) &lt;/p&gt;
{
+        *result = Status(ErrorCodes::NotMaster, &quot;currently running for election&quot;);
+        return;
+    }
&lt;p&gt;+&lt;br/&gt;
     stdx::unique_lock&amp;lt;stdx::mutex&amp;gt; lk(_mutex);&lt;br/&gt;
     if (_getMemberState_inlock().primary()) {&lt;br/&gt;
         *result = Status(ErrorCodes::NotSecondary, &quot;primaries can&apos;t modify maintenance mode&quot;);&lt;/p&gt;</comment>
                            <comment id="1036936" author="benety.goh" created="Fri, 18 Sep 2015 15:38:55 +0000"  >&lt;p&gt;commit 2e7162c79274ba4708a307cda38e5d2ea90525f3&lt;br/&gt;
Author:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
AuthorDate: Thu Sep 17 16:02:10 2015 -0400&lt;br/&gt;
Commit:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
CommitDate: Fri Sep 18 11:32:39 2015 -0400&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; removed unused test function ReplCoordTest::simulateStepDownOnIsolation()&lt;/p&gt;

&lt;p&gt;commit 756addb3f1f7d92189c398ef844d158b4e0065a9&lt;br/&gt;
Author:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
AuthorDate: Thu Sep 17 16:00:02 2015 -0400&lt;br/&gt;
Commit:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
CommitDate: Fri Sep 18 11:32:39 2015 -0400&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; added test for calling ReplicationCoordinator::setMaintenanceMode() as candidate&lt;/p&gt;

&lt;p&gt;commit 46e6c6be50a33c54127ea4f6364efdd23f738c02&lt;br/&gt;
Author:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
AuthorDate: Thu Sep 17 15:59:34 2015 -0400&lt;br/&gt;
Commit:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
CommitDate: Fri Sep 18 11:32:39 2015 -0400&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; ReplicationCoordinator::setMaintenanceMode() should fail if the node is currently running for election&lt;/p&gt;

&lt;p&gt;commit 934fd877b3499ea8b5cf06b1345e4e5cb31488d6&lt;br/&gt;
Author:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
AuthorDate: Thu Sep 17 15:01:33 2015 -0400&lt;br/&gt;
Commit:     Benety Goh &amp;lt;benety@mongodb.com&amp;gt;&lt;br/&gt;
CommitDate: Fri Sep 18 11:32:39 2015 -0400&lt;/p&gt;

&lt;p&gt;    &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20473&quot; title=&quot;calling setMaintenanceMode(true) while running for election crashes server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20473&quot;&gt;&lt;del&gt;SERVER-20473&lt;/del&gt;&lt;/a&gt; moved ReplCoordElectV1Test::simulateSuccessfulDryRun() to ReplCoordTest&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="15689">3.0.7</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 Sep 2015 18:29:20 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 21 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 Sep 2015 23:59:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>crystal.horn@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 21 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>benety.goh@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkugv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsd6ov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="720">Repl B (10/30/15)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 17 Sep 2015 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrisov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>