<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:54:40 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-40336] ReplicationCoordinatorImpl::_random isn&apos;t robust to replica set members being started at the same time</title>
                <link>https://jira.mongodb.org/browse/SERVER-40336</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We&apos;ve observed multiple cases in the &lt;tt&gt;sys&amp;#45;perf&lt;/tt&gt; and &lt;tt&gt;sys&amp;#45;perf&amp;#45;4.0&lt;/tt&gt; Evergreen projects where a 2-node replica set, 2-shard cluster is restarted and one of the replica set shards fails to elect a member as primary after 11 attempts spanning ~2 minutes. Both nodes in the 2-node replica set had run for election at the same time repeatedly and consistently encountered a situation where each node had already voted for itself in that term. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.9/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp#L796&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;While random jitter is added to the election timeout&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.9/src/mongo/db/repl/replication_coordinator_impl.cpp#L3835-L3837&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;it is based on a &lt;tt&gt;PseudoRandom&lt;/tt&gt;&lt;/a&gt; that is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.9/src/mongo/db/db.cpp#L837&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;seeded with the current time on startup&lt;/a&gt;. The performance infrastructure spawns mongod processes concurrently and appears to end up in situations where the time on startup and thus the seed for &lt;tt&gt;ReplicationCoordinatorImpl::_random&lt;/tt&gt; is the same.&lt;/p&gt;</description>
                <environment></environment>
        <key id="722996">SERVER-40336</key>
            <summary>ReplicationCoordinatorImpl::_random isn&apos;t robust to replica set members being started at the same time</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="13201">Fixed</resolution>
                                        <assignee username="siyuan.zhou@mongodb.com">Siyuan Zhou</assignee>
                                    <reporter username="max.hirschhorn@mongodb.com">Max Hirschhorn</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Mar 2019 04:16:40 +0000</created>
                <updated>Sun, 29 Oct 2023 22:22:37 +0000</updated>
                            <resolved>Mon, 8 Apr 2019 18:03:53 +0000</resolved>
                                                    <fixVersion>3.4.22</fixVersion>
                    <fixVersion>3.6.14</fixVersion>
                    <fixVersion>4.1.10</fixVersion>
                    <fixVersion>4.0.11</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2285729" author="xgen-internal-githook" created="Fri, 14 Jun 2019 19:13:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Siyuan Zhou&apos;, &apos;email&apos;: &apos;siyuan.zhou@mongodb.com&apos;, &apos;username&apos;: &apos;visualzhou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40336&quot; title=&quot;ReplicationCoordinatorImpl::_random isn&amp;#39;t robust to replica set members being started at the same time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40336&quot;&gt;&lt;del&gt;SERVER-40336&lt;/del&gt;&lt;/a&gt; Use SecureRandom to seed the random number generator in replication coordinator.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c600aa9d7423eca8151daf626e2799d9a6c7b31c)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/51547d1484c8d885a206d6087c164f9cf3e87e64&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/51547d1484c8d885a206d6087c164f9cf3e87e64&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2285728" author="xgen-internal-githook" created="Fri, 14 Jun 2019 19:13:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Siyuan Zhou&apos;, &apos;email&apos;: &apos;siyuan.zhou@mongodb.com&apos;, &apos;username&apos;: &apos;visualzhou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40336&quot; title=&quot;ReplicationCoordinatorImpl::_random isn&amp;#39;t robust to replica set members being started at the same time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40336&quot;&gt;&lt;del&gt;SERVER-40336&lt;/del&gt;&lt;/a&gt; Use SecureRandom to seed the random number generator in replication coordinator.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c600aa9d7423eca8151daf626e2799d9a6c7b31c)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/89f180375cdde8ed4c5ed72c74af4c48d9a3f401&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/89f180375cdde8ed4c5ed72c74af4c48d9a3f401&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2285723" author="xgen-internal-githook" created="Fri, 14 Jun 2019 19:11:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Siyuan Zhou&apos;, &apos;email&apos;: &apos;siyuan.zhou@mongodb.com&apos;, &apos;username&apos;: &apos;visualzhou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40336&quot; title=&quot;ReplicationCoordinatorImpl::_random isn&amp;#39;t robust to replica set members being started at the same time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40336&quot;&gt;&lt;del&gt;SERVER-40336&lt;/del&gt;&lt;/a&gt; Use SecureRandom to seed the random number generator in replication coordinator.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit c600aa9d7423eca8151daf626e2799d9a6c7b31c)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9d0331eb17fddb3ae2215648363223cc0ae03a0f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9d0331eb17fddb3ae2215648363223cc0ae03a0f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2205506" author="xgen-internal-githook" created="Mon, 8 Apr 2019 18:03:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Siyuan Zhou&apos;, &apos;username&apos;: &apos;visualzhou&apos;, &apos;email&apos;: &apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40336&quot; title=&quot;ReplicationCoordinatorImpl::_random isn&amp;#39;t robust to replica set members being started at the same time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40336&quot;&gt;&lt;del&gt;SERVER-40336&lt;/del&gt;&lt;/a&gt; Use SecureRandom to seed the random number generator in replication coordinator.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c600aa9d7423eca8151daf626e2799d9a6c7b31c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c600aa9d7423eca8151daf626e2799d9a6c7b31c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2197566" author="schwerin" created="Mon, 1 Apr 2019 13:40:59 +0000"  >&lt;p&gt;Ha! That was probably constructed before we had a good implementation of SecureRandom. I suggest we initialize the PRNG with the output of an instance of SecureRandom as a short-term fix. I suspect we could also adjust the constructor of ReplicationCoordinatorImpl to accept a RNG instead of a seed for a PRNG it constructs itself. If RCI uses its random number generator infrequently enough, we might consider just letting it use SecureRandom in production and keeping the PRNG for deterministic unit testing only.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    <customfieldvalue key="14340"><![CDATA[v3.4]]></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>Mon, 1 Apr 2019 13:40:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 34 weeks, 5 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_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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 34 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hurv5b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|huhfr3:</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="2896">Repl 2019-04-08</customfieldvalue>
    <customfieldvalue id="2918">Repl 2019-04-22</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|hurhen:</customfieldvalue>

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