<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:04:05 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-43778] db_repl_coordinator_test relies on specific PseudoRandom sequence</title>
                <link>https://jira.mongodb.org/browse/SERVER-43778</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;An upgrade to PseudoRandom was reverted due to a test relying on the specific bits output by PseudoRandom(0). This is not a good situation (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43641&quot; title=&quot;platform/random.h causing bugs, upgrade overdue&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43641&quot;&gt;&lt;del&gt;SERVER-43641&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Tests must not hardcode this sort of thing. If we do, we can never make improvements to the generators without updating all such tests.&lt;/p&gt;


&lt;p&gt;Regarding db/repl/replication_coordinator_impl_elect_v1_test.cpp:&lt;br/&gt;
3 tests from the TakeoverTest/ suite are affected:&lt;/p&gt;

&lt;p&gt;  CatchupTakeoverCallbackCanceledIfElectionTimeoutRuns&lt;br/&gt;
  DontCallForPriorityTakeoverWhenLaggedDifferentSecond&lt;br/&gt;
  DontCallForPriorityTakeoverWhenLaggedSameSecond&lt;/p&gt;

&lt;p&gt;These only seem to work reliably when fed a (now legacy) PseudoRandom&lt;br/&gt;
initialized with a seed of 0. Otherwise the election timeouts are randomized in such a way that the test doesn&apos;t reach the desired state, and it fails.&lt;br/&gt;
This is extremely fragile and should be fixed asap.&lt;/p&gt;

&lt;p&gt;The ReplCoordinatorImpl takes a seed in its constructor. From this seed it makes a PseudoRandom which it uses to generate electionTimeout intervals. This is very hit-or-miss, and a test would have to hope to find a seed that puts the RS into a desired state, and such a seed, if found, would need to be updated with every little tweak of the random number generator or the interval upperBound, etc. Tests really need to directly control the election timeout durations in order to get the RS into their desired state. So really the ctor should take a Duration generator rather than a seed.&lt;/p&gt;

&lt;p&gt;For the moment I&apos;m going to bring the entire PseudoRandom &quot;XorShift&quot; implementation into the test as a generator.&lt;/p&gt;

&lt;p&gt;PS: Another way to go here would be to use a FailPoint to inject an electionTimeout result, overriding the randomly generated result.&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43767&quot; title=&quot;free_mon_controller_test relies on specific PseudoRandom sequence.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43767&quot;&gt;&lt;del&gt;SERVER-43767&lt;/del&gt;&lt;/a&gt; (related issue in another test)&lt;/p&gt;
</description>
                <environment></environment>
        <key id="957157">SERVER-43778</key>
            <summary>db_repl_coordinator_test relies on specific PseudoRandom sequence</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="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Oct 2019 01:11:45 +0000</created>
                <updated>Sun, 29 Oct 2023 22:16:32 +0000</updated>
                            <resolved>Tue, 8 Oct 2019 21:19:08 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2472434" author="xgen-internal-githook" created="Tue, 8 Oct 2019 20:46:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;BillyDonahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;name&apos;: &apos;Billy Donahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43778&quot; title=&quot;db_repl_coordinator_test relies on specific PseudoRandom sequence&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43778&quot;&gt;&lt;del&gt;SERVER-43778&lt;/del&gt;&lt;/a&gt; remove randomness fragility from ReplicationCoordinatorImpl tests&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f1a3b974c9b8f9519bbc317859a8ff9bde62e72a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f1a3b974c9b8f9519bbc317859a8ff9bde62e72a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2464046" author="billy.donahue" created="Thu, 3 Oct 2019 17:35:56 +0000"  >&lt;p&gt;Sorry, I don&apos;t see how it will fix the problem.&lt;br/&gt;
A specific sequence of timeout variations seems necessary to the test.&lt;br/&gt;
Just reducing those variations to zero doesn&apos;t yield a passing test.&lt;/p&gt;</comment>
                            <comment id="2463940" author="william.schultz" created="Thu, 3 Oct 2019 16:45:41 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=billy.donahue&quot; class=&quot;user-hover&quot; rel=&quot;billy.donahue&quot;&gt;billy.donahue&lt;/a&gt; If there are certain tests that require election timeouts to be deterministic, I think the simplest solution would be to explicitly set the &lt;tt&gt;electionTimeoutOffsetLimitFraction&lt;/tt&gt; to 0 for the tests that need it. This parameter controls the size of the random offset added to the base election timeout. If it is 0 then the election timeout values will be constant, since there is no random offset added. You can see an example of us doing this in another unit test &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e4139a8394fb7d35503a0b559fc90723f7ab9de7/src/mongo/db/repl/replication_coordinator_impl_test.cpp#L2105&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. I agree it&apos;s not great that certain tests rely on the specific values of the election timeout, but I think this is probably the easiest fix to avoid the problems you are seeing with the new random number generator.&lt;/p&gt;</comment>
                            <comment id="2455229" author="billy.donahue" created="Thu, 3 Oct 2019 02:09:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt; I&apos;m not entirely satisfied with the workaround I&apos;ve implemented in the CR, but OTOH I don&apos;t know enough about the subject matter here to design a logical sequence of electionTimeouts to inject. The workaround unblocks the changes I need to make to random.h. What do you think?&lt;/p&gt;</comment>
                            <comment id="2454634" author="billy.donahue" created="Thu, 3 Oct 2019 01:13:29 +0000"  >&lt;p&gt;&lt;a href=&quot;http://mongodbcr.appspot.com/481660028&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongodbcr.appspot.com/481660028&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                        <issuelink>
            <issuekey id="940083">SERVER-43641</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_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>Thu, 3 Oct 2019 13:04:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 18 weeks, 1 day 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>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, 18 weeks, 1 day 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>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvvdnb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvjx5z:</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="3281">Dev Tools 2019-10-07</customfieldvalue>
    <customfieldvalue id="3282">Dev Tools 2019-10-21</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>
&lt;p&gt;&lt;a href=&quot;https://logkeeper.mongodb.org/lobster/build/963b4308c9524506b0757603f70ff063/test/5d942c83c2ab68380ca0e7a0#bookmarks=0%2C38606&amp;amp;l=1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://logkeeper.mongodb.org/lobster/build/963b4308c9524506b0757603f70ff063/test/5d942c83c2ab68380ca0e7a0#bookmarks=0%2C38606&amp;amp;l=1&lt;/a&gt;&lt;/p&gt;</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|hvuzwn:</customfieldvalue>

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