<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:04:26 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-3921] Add command to force a secondary to sync from a specific replica set member</title>
                <link>https://jira.mongodb.org/browse/SERVER-3921</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This is necessary in high-load situation, where you might want to resync from a hidden member, for example.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22650">SERVER-3921</key>
            <summary>Add command to force a secondary to sync from a specific replica set member</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="-1">Unassigned</assignee>
                                    <reporter username="kbanker">Kyle Banker</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Sep 2011 18:16:54 +0000</created>
                <updated>Sat, 19 Nov 2016 00:04:41 +0000</updated>
                            <resolved>Mon, 10 Oct 2016 14:13:08 +0000</resolved>
                                                    <fixVersion>2.1.1</fixVersion>
                                    <component>Replication</component>
                                        <votes>2</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="1403342" author="shakir.sadikali" created="Fri, 7 Oct 2016 20:26:05 +0000"  >&lt;p&gt;OK, I just found &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23476&quot; title=&quot;Re-enable resync command for replica set nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23476&quot;&gt;&lt;del&gt;SERVER-23476&lt;/del&gt;&lt;/a&gt;.  This can be closed.&lt;/p&gt;</comment>
                            <comment id="1403333" author="shakir.sadikali" created="Fri, 7 Oct 2016 20:19:39 +0000"  >&lt;p&gt;I&apos;m requesting that we reopen this request.  I&apos;ve had numerous requests in Support with customers asking how they can force an initial sync from a designated secondary (or any node for that matter).  All from MongoDB 3.0 onwards.&lt;/p&gt;

&lt;p&gt;While I appreciate that we can specify the sync source... the mechanics of doing so are painful (with multiple customers using the term &quot;hacky&quot; to describe it).&lt;/p&gt;

&lt;p&gt;Can we have a more elegant solution to it?  Perhaps being able to add in the sync source when actually adding the node or a startup parameter to control it when it comes up for the first time?&lt;/p&gt;

&lt;p&gt;I appreciate this may not be the right place to put this request.  Please direct me to the right place.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Shak&lt;/p&gt;</comment>
                            <comment id="101354" author="auto" created="Thu, 22 Mar 2012 14:19:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;kchodorow&apos;, u&apos;name&apos;: u&apos;Kristina&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;}
&lt;p&gt;Message: Added replSetSyncFrom command &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3921&quot; title=&quot;Add command to force a secondary to sync from a specific replica set member&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3921&quot;&gt;&lt;del&gt;SERVER-3921&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;	src/mongo/db/repl/rs_sync.cpp&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/04507d983dd1715ae4213485d1faf23f6d64b1a8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/04507d983dd1715ae4213485d1faf23f6d64b1a8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="81354" author="jkoppe@indeed.com" created="Fri, 20 Jan 2012 21:17:28 +0000"  >&lt;p&gt;Using tags seems good to me.  Our replica sets span multiple datacenters and it&apos;d be extremely useful to sync from a specific tag (rack, datacenter, etc).&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;What if the server(s) we ask a member to sync from aren&apos;t available, though? Should it just sit there and not sync? Sync from a member we didn&apos;t specify? That could suddenly put load on the primary or something. Maybe allow an array of tags, first try servers tagged &quot;x&quot;, then &quot;y&quot;, then &quot;z&quot; ({_id : 0, host : ..., syncFrom : &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot;&amp;#93;&lt;/span&gt;}.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I don&apos;t think you should fallback to syncing from a member we didn&apos;t specify.  A list of tags to try seems good, and if it cannot sync from any of those servers, just stay in recovering state with some error message.&lt;/p&gt;</comment>
                            <comment id="67968" author="eliwjones" created="Mon, 21 Nov 2011 16:34:59 +0000"  >&lt;p&gt;Kristina,&lt;/p&gt;

&lt;p&gt;Tags could work nicely.  If it is simpler on your end to have tagging specify replica sync behaviour (instead of using an optional command line parameter), then I&apos;m very happy to use tagging.&lt;/p&gt;

&lt;p&gt;So.. for our purposes, we could just have a &quot;non-hidden&quot; tag (or &quot;East Coast Sync-able&quot;).  And, if the replica set is in a healthy state, at least one server tagged as &quot;non-hidden&quot; will be available at any given time.  Then, you could just use your regular initial sync heuristic against those servers to pick which one to sync to.  &lt;/p&gt;

&lt;p&gt;Having an array of tags would be nice.. since could have an &quot;East Coast Sync-able&quot; tag and then a &quot;West Coast Sync-able&quot; one.&lt;/p&gt;

&lt;p&gt;Though, in the end.. I personally prefer a command line parameter.. since at the point in time that I am adding a new member or resyncing an existing member.. it&apos;s hard to say for sure what state the architecture will be in.  And, at that moment.. I will know that I need the member to sync to the Primary.. since, for example maybe there is a secondary that it could sync to.. but that secondary&apos;s data is not in RAM.. Maybe the secondary&apos;s data has become sort of fragmented and big.. and if the initial oplog application pulls from it.. that will push too much data out of RAM (to make room for the oplog reads).. and cause me heartache.. etc.&lt;/p&gt;

&lt;p&gt;But, if this tagging method is the compromise, I am very happy to get it.&lt;/p&gt;

&lt;p&gt;Thanks again for all your help with this.&lt;/p&gt;</comment>
                            <comment id="67957" author="kristina" created="Mon, 21 Nov 2011 16:06:43 +0000"  >&lt;p&gt;@Ian: Tagging lets you specify any set of servers, so you could use it for syncing from a specific server, syncing from a certain rack, etc. See &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Data+Center+Awareness#DataCenterAwareness-Tagging%28version2.0%29&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Data+Center+Awareness#DataCenterAwareness-Tagging%28version2.0%29&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I like the idea of using tags, probably in the replica set config (e.g., {_id : 0, host : ..., syncFrom : &quot;tag1&quot;} or something).  What if the server(s) we ask a member to sync from aren&apos;t available, though?  Should it just sit there and not sync?  Sync from a member we didn&apos;t specify?  That could suddenly put load on the primary or something.  Maybe allow an array of tags, first try servers tagged &quot;x&quot;, then &quot;y&quot;, then &quot;z&quot; ({_id : 0, host : ..., syncFrom : &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot;&amp;#93;&lt;/span&gt;}.&lt;/p&gt;</comment>
                            <comment id="67778" author="ibwhite" created="Sun, 20 Nov 2011 14:22:57 +0000"  >&lt;p&gt;We would be excited to get this ability in any form, but it seems much more awkward to me if it&apos;s a command.&lt;/p&gt;

&lt;p&gt;When you start a node that is already a replset member with empty data, it starts up and then immediately starts syncing automatically. It seems like it would be awkward to start up mongod, and then have to quickly enter into the shell and execute a command before it starts syncing. But maybe I&apos;m misunderstanding.&lt;/p&gt;

&lt;p&gt;Re: tagging &amp;#8211; how this would work? Is the idea that we would tag datacenters and then be able to specify a tag to sync from, but not the specific node?&lt;/p&gt;</comment>
                            <comment id="67438" author="dwight_10gen" created="Thu, 17 Nov 2011 18:49:14 +0000"  >&lt;p&gt;if we ever did have an option, i&apos;d like it to not be a cmd line parameter but something else. not sure what makes sense. could be via the setParameter command if it is something rarely used.  ideally have no setting.  hmmm.  &lt;/p&gt;

&lt;p&gt;given we have tagging could it be done via that?&lt;/p&gt;</comment>
                            <comment id="56350" author="eliwjones" created="Sat, 24 Sep 2011 01:59:21 +0000"  >&lt;p&gt;I would like to reiterate Ian&apos;s point (granted, we work together so I guess this is just double voting).. whatever heuristic you use to pick a node to sync to.. it will not be able to cover all scenarios.  So, in the event of a situation where the heuristic fails and an administrator wants to sync to a specific node that isn&apos;t hidden (or isn&apos;t a secondary), it would be nice to have an optional --syncTo flag.&lt;/p&gt;</comment>
                            <comment id="56326" author="ibwhite" created="Fri, 23 Sep 2011 22:32:48 +0000"  >&lt;p&gt;Not a fan of this idea.&lt;/p&gt;

&lt;p&gt;This heuristic seems to assume that a hidden node is going to always be lower load than non-hidden nodes. But in many architectures, people have backup nodes that are running on underpowered pieces of hardware. They&apos;re hidden because they&apos;re backups, and nobody is supposed to query them if it&apos;s avoidable, not even their oplog. In those scenarios, you&apos;re better off syncing from something else.&lt;/p&gt;

&lt;p&gt;(This is definitely true of our current architecture &amp;#8211; we have most of our sets writing to a hidden backup node which is usually very busy. We use it just to take snapshots and do emergency recovery. We generally want to avoid syncing from it.)&lt;/p&gt;

&lt;p&gt;If you want a general heuristic, it would be better I think to measure load on the nodes and prefer syncing from the node with lowest load.&lt;/p&gt;

&lt;p&gt;Whatever heuristic you settle on, though, having the option to manually override with a --syncto parameter would be appreciated for the edge cases where the heuristic fails. Otherwise we&apos;re put in the position of having to shut down nodes to get it to sync the right one.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="36604">DOCS-189</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="29883">SERVER-4873</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.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, 22 Sep 2011 15:40:35 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 18 weeks, 5 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>eliwjones</customfieldvalue>
            <customfieldvalue>ibwhite</customfieldvalue>
            <customfieldvalue>jkoppe@indeed.com</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
            <customfieldvalue>kbanker</customfieldvalue>
            <customfieldvalue>shakir.sadikali@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hropx3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8171</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|ht0trj:</customfieldvalue>

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