<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:16:54 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-8235] too-frequent sync source changes causes node to fall behind</title>
                <link>https://jira.mongodb.org/browse/SERVER-8235</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Given particular replica set configurations and network delays, it&apos;s possible for a node to repeatedly change the host it syncs from after every replicated batch.  This causes the node to fall behind, and eventually the node ends up in recovery mode.&lt;/p&gt;</description>
                <environment></environment>
        <key id="62581">SERVER-8235</key>
            <summary>too-frequent sync source changes causes node to fall behind</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="kristina">Kristina Chodorow</assignee>
                                    <reporter username="greg_10gen">Greg Studer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Jan 2013 18:24:47 +0000</created>
                <updated>Mon, 11 Jul 2016 17:58:24 +0000</updated>
                            <resolved>Sat, 16 Feb 2013 12:47:08 +0000</resolved>
                                                    <fixVersion>2.4.0-rc1</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="267909" author="auto" created="Sat, 16 Feb 2013 12:44:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-02-14T22:09:12Z&apos;, u&apos;name&apos;: u&apos;Kristina&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8235&quot; title=&quot;too-frequent sync source changes causes node to fall behind&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8235&quot;&gt;&lt;del&gt;SERVER-8235&lt;/del&gt;&lt;/a&gt; Consistently prefer sync targets with less than 30 secs of lag&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/692090f1efd4a5a869abcddadefac1cdc5de69d0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/692090f1efd4a5a869abcddadefac1cdc5de69d0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="243950" author="greg_10gen" created="Fri, 18 Jan 2013 22:21:03 +0000"  >&lt;p&gt;Confirmed reproducible with only connection delays, no need to forbid connections between primary and swapping node.&lt;/p&gt;</comment>
                            <comment id="243741" author="greg_10gen" created="Fri, 18 Jan 2013 18:31:32 +0000"  >&lt;p&gt;Attached two logs with periodic replSetGetStatus output from all nodes before and during the problem period, along with .js test.&lt;/p&gt;</comment>
                            <comment id="243737" author="greg_10gen" created="Fri, 18 Jan 2013 18:28:39 +0000"  >&lt;p&gt;Also tried testing with slaveDelay of 20s, to rule out the delays and chaining in general as the problem.  Without sync source swapping, all nodes are able to stay up-to-date.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="32219">SERVER-5208</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="23273" name="currentTest.txt" size="2062180" author="greg_10gen" created="Fri, 18 Jan 2013 18:31:32 +0000"/>
                            <attachment id="23274" name="currentTest_fallbehind.txt" size="918572" author="greg_10gen" created="Fri, 18 Jan 2013 18:31:32 +0000"/>
                            <attachment id="23290" name="helpers.js" size="4655" author="greg_10gen" created="Fri, 18 Jan 2013 22:22:03 +0000"/>
                            <attachment id="23289" name="sync_fast_switch.js" size="2638" author="greg_10gen" created="Fri, 18 Jan 2013 22:22:03 +0000"/>
                            <attachment id="23275" name="sync_fast_switch.js" size="2570" author="greg_10gen" created="Fri, 18 Jan 2013 18:31:32 +0000"/>
                    </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 1 Feb 2013 18:50:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 4 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></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>auto</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnax3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>40126</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1) Setup a replica set with 5 nodes A, B, C, D, E, primary is A&lt;br/&gt;
2) Artificially slaveDelay nodes B and C by 40s, and node D by 80s&lt;br/&gt;
3) Artificially introduce network latency such D&apos;s ping time to B and C is low but varies, and the latency from D to E is high (so E will never be chosen as a sync source)&lt;br/&gt;
4) Symmetrically blackhole connections from A to D, to make sure D doesn&apos;t choose the primary as a sync source initially (could be done differently, this was just easiest).&lt;br/&gt;
5) Start single-threaded javascript insert load on node A&lt;/p&gt;

&lt;p&gt;The idea here is that there are three lagging nodes in the replica set, B, C, and D.  Because E is 30s ahead of B and C, D will keep trying to change sync sources.  However, since B and C are closer in ping time than E, E will never be chosen and the sync source changes between C and D depending on the stochastic ping delay.&lt;/p&gt;

&lt;p&gt;This kind of problem might occur in the wild if three lagging nodes were in a separate data center, for example.  Once a node falls too far behind the others, the sync swapping would push the node into permanent recovery mode (until one of the other nodes catches up).&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|hrof7r:</customfieldvalue>

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