<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:06:52 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-4750] Secondary syncs to another secondary that has slaveDelay &gt; 0</title>
                <link>https://jira.mongodb.org/browse/SERVER-4750</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have this replset:&lt;/p&gt;


&lt;p&gt;{&lt;br/&gt;
        &quot;_id&quot; : &quot;myReplSet&quot;,&lt;br/&gt;
        &quot;version&quot; : 9,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 0,
                        &quot;host&quot; : &quot;a1.serv:27017&quot;
                }
&lt;p&gt;,&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 1,
                        &quot;host&quot; : &quot;s1.serv:27017&quot;,
                        &quot;priority&quot; : 0,
                        &quot;slaveDelay&quot; : 10800,
                        &quot;hidden&quot; : true
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 2,
                        &quot;host&quot; : &quot;a2.serv:27017&quot;
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;br/&gt;
a1.serv ist primary atm.&lt;br/&gt;
when a2.serv starts the log says:&lt;/p&gt;

&lt;p&gt;Tue Jan 24 10:59:40 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsStart&amp;#93;&lt;/span&gt; replSet STARTUP2&lt;br/&gt;
Tue Jan 24 10:59:40 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsSync&amp;#93;&lt;/span&gt; replSet SECONDARY&lt;br/&gt;
Tue Jan 24 10:59:42 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsHealthPoll&amp;#93;&lt;/span&gt; replSet member a1.serv:27017 is up&lt;br/&gt;
Tue Jan 24 10:59:42 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsHealthPoll&amp;#93;&lt;/span&gt; replSet member a1.serv:27017 is now in state PRIMARY&lt;br/&gt;
Tue Jan 24 10:59:42 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsHealthPoll&amp;#93;&lt;/span&gt; replSet member s1.serv:27017 is up&lt;br/&gt;
Tue Jan 24 10:59:42 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsHealthPoll&amp;#93;&lt;/span&gt; replSet member s1.serv:27017 is now in state SECONDARY&lt;br/&gt;
Tue Jan 24 10:59:46 &lt;span class=&quot;error&quot;&gt;&amp;#91;rsSync&amp;#93;&lt;/span&gt; replSet syncing to: s1.serv:27017&lt;/p&gt;


&lt;p&gt;The only solution right now seems to remove slaveDelay for s1.serv.&lt;/p&gt;

&lt;p&gt;How it should be: if a secondary in a replset searches for a peer to sync it should exclude peers that have a slaveDelay higher than itself.&lt;/p&gt;</description>
                <environment></environment>
        <key id="29000">SERVER-4750</key>
            <summary>Secondary syncs to another secondary that has slaveDelay &gt; 0</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="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="ahofmann">Ansgar Hofmann</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jan 2012 10:39:57 +0000</created>
                <updated>Wed, 4 Feb 2015 20:19:46 +0000</updated>
                            <resolved>Tue, 6 Mar 2012 19:15:56 +0000</resolved>
                                    <version>1.8.4</version>
                    <version>2.0.2</version>
                                    <fixVersion>2.0.6</fixVersion>
                    <fixVersion>2.1.1</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="118251" author="auto" created="Thu, 10 May 2012 18:00:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5706&quot; title=&quot;If only slaveDelay&amp;#39;d nodes are available, use them&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5706&quot;&gt;&lt;del&gt;SERVER-5706&lt;/del&gt;&lt;/a&gt; if only slaveDelay&apos;d nodes are available, use them&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4750&quot; title=&quot;Secondary syncs to another secondary that has slaveDelay &amp;gt; 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4750&quot;&gt;&lt;del&gt;SERVER-4750&lt;/del&gt;&lt;/a&gt; prevent syncing to secondaries with a slavedelay greater than yourself&lt;/p&gt;

&lt;p&gt;Conflicts:&lt;/p&gt;

&lt;p&gt;	db/repl/rs_initialsync.cpp&lt;br/&gt;
	jstests/replsets/slavedelay3.js&lt;br/&gt;
Branch: v2.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1aaac5eb0dc31c80f82080c9b3e75b49409b74cd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1aaac5eb0dc31c80f82080c9b3e75b49409b74cd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="113799" author="schwerin" created="Wed, 25 Apr 2012 21:37:21 +0000"  >&lt;p&gt;For 2.0.6, I think.&lt;/p&gt;</comment>
                            <comment id="113638" author="scotthernandez" created="Wed, 25 Apr 2012 16:29:33 +0000"  >&lt;p&gt;Yep, added a new issue to address this in the future : &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5706&quot; title=&quot;If only slaveDelay&amp;#39;d nodes are available, use them&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5706&quot;&gt;&lt;del&gt;SERVER-5706&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="113634" author="schwerin" created="Wed, 25 Apr 2012 16:17:46 +0000"  >&lt;p&gt;Before backporting, I&apos;d like to know that this won&apos;t prevent syncing of secondaries that can only communicate with slave-delayed secondaries.&lt;/p&gt;</comment>
                            <comment id="96792" author="samk" created="Thu, 8 Mar 2012 15:47:05 +0000"  >&lt;p&gt;Marking documentation done after creating a separate docs ticket to be addressed in the near future.&lt;/p&gt;</comment>
                            <comment id="96429" author="auto" created="Wed, 7 Mar 2012 16:48:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4750&quot; title=&quot;Secondary syncs to another secondary that has slaveDelay &amp;gt; 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4750&quot;&gt;&lt;del&gt;SERVER-4750&lt;/del&gt;&lt;/a&gt; ensure member 0 is always elected primary, for test stability&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/eceb7584894362f09ba8ad5cbbc7a7a28fca35fb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/eceb7584894362f09ba8ad5cbbc7a7a28fca35fb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="96100" author="auto" created="Tue, 6 Mar 2012 22:30:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4750&quot; title=&quot;Secondary syncs to another secondary that has slaveDelay &amp;gt; 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4750&quot;&gt;&lt;del&gt;SERVER-4750&lt;/del&gt;&lt;/a&gt; make unit test more reliable&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/28b3a0a48a9d6a6d76a723ee19b404512d18998d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/28b3a0a48a9d6a6d76a723ee19b404512d18998d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="95966" author="auto" created="Tue, 6 Mar 2012 18:51:05 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4750&quot; title=&quot;Secondary syncs to another secondary that has slaveDelay &amp;gt; 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4750&quot;&gt;&lt;del&gt;SERVER-4750&lt;/del&gt;&lt;/a&gt;: prevent syncing to secondaries with a slavedelay greater than yourself&lt;/p&gt;

&lt;p&gt;After &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5208&quot; title=&quot;Replica set periodic reevaluation of sync targets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5208&quot;&gt;&lt;del&gt;SERVER-5208&lt;/del&gt;&lt;/a&gt;, we can rework the logic here so that if a slavedelay&apos;d node&lt;br/&gt;
is still ahead of us, we can use it for a little while and then once we&apos;re caught&lt;br/&gt;
up we&apos;ll reevaluate the cluster for better nodes to sync from.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e4f3f956888da028bb13a469f99941537f35f272&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e4f3f956888da028bb13a469f99941537f35f272&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="37166">SERVER-5706</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="26063">SERVER-4439</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="32219">SERVER-5208</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="32513">DOCS-154</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="44259">SERVER-6457</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 31 Jan 2012 23:18:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 40 weeks, 6 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, 40 weeks, 6 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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>ahofmann</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrog0f:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9066</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_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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|ht0ajr:</customfieldvalue>

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