<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:27:02 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-31429] Use the last fetched instead of the last applied to evaluate sync sources</title>
                <link>https://jira.mongodb.org/browse/SERVER-31429</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/cb9f7cdcb7eb6ad9077ac8af3a4c0d7275c7e34f/src/mongo/db/repl/oplog_fetcher.cpp#L489&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check whether we should stop fetching&lt;/a&gt; from our current sync source and re-evaluate our sync source selection every time we &lt;b&gt;fetch&lt;/b&gt; a batch from our sync source.  Part of the check for whether we should change sync sources includes whether we are currently caught up to our sync source (iff our sync source in turn has no sync source and isn&apos;t primary).  If the batch we just fetched is the one that makes us caught up to our sync source, now we&apos;ll wait for another batch to time out its awaitData timeout before changing sync sources.  If we checked whether we should re-evaluate our sync source at the end of &lt;b&gt;applying&lt;/b&gt; a batch, we could change sync sources faster in the case that our sync source has become isolated from the primary&lt;/p&gt;</description>
                <environment></environment>
        <key id="441395">SERVER-31429</key>
            <summary>Use the last fetched instead of the last applied to evaluate sync sources</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="xuerui.fa@mongodb.com">Xuerui Fa</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                            <label>former-quick-wins</label>
                            <label>neweng</label>
                    </labels>
                <created>Thu, 5 Oct 2017 21:48:47 +0000</created>
                <updated>Mon, 30 Oct 2023 23:13:02 +0000</updated>
                            <resolved>Thu, 16 Apr 2020 17:36:19 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="3042995" author="xgen-internal-githook" created="Thu, 16 Apr 2020 17:31:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Xuerui Fa&apos;, &apos;email&apos;: &apos;xuerui.fa@mongodb.com&apos;, &apos;username&apos;: &apos;XueruiFa&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31429&quot; title=&quot;Use the last fetched instead of the last applied to evaluate sync sources&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31429&quot;&gt;&lt;del&gt;SERVER-31429&lt;/del&gt;&lt;/a&gt;: Use last fetched instead of last applied OpTime to eval sync sources&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/405ee7a9a39f6dc3893e4e5039e2971e14d8c8d5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/405ee7a9a39f6dc3893e4e5039e2971e14d8c8d5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1954323" author="spencer" created="Mon, 23 Jul 2018 22:09:09 +0000"  >&lt;p&gt;Why would it?  The behavior change is pretty straightforward and non-controversial.  The only potential questions are about the implementation approach in the code (although I believe even those were answered by my previous comments), which we generally don&apos;t do design documents for.&lt;/p&gt;</comment>
                            <comment id="1943219" author="greg.mckeon" created="Tue, 10 Jul 2018 15:44:35 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt; can you clarify why the work here wouldn&apos;t need design?&lt;/p&gt;</comment>
                            <comment id="1691971" author="spencer" created="Fri, 6 Oct 2017 20:44:31 +0000"  >&lt;p&gt;Looks like we already decide what sync source to use based on last fetched, per &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19375&quot; title=&quot;choosing syncsource should compare against last fetched optime rather than last applied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19375&quot;&gt;&lt;del&gt;SERVER-19375&lt;/del&gt;&lt;/a&gt;.  So all that needs to be done here is thread lastOpFetched through shouldChangeSyncSource and use that instead of lastOpApplied&lt;/p&gt;</comment>
                            <comment id="1691960" author="spencer" created="Fri, 6 Oct 2017 20:34:55 +0000"  >&lt;p&gt;There might be an easier way to do this by making both the decision about whether we should re-evaluate sync sources and the decision about what new sync source to choose be based on the last op fetched instead of the last op applied&lt;/p&gt;</comment>
                            <comment id="1691510" author="spencer" created="Fri, 6 Oct 2017 15:18:19 +0000"  >&lt;p&gt;Yeah, this will probably be tricky to implement with the way the code is currently structured, since it would require passing the OplogQueryMetadata through from the Producer to the Applier, and would require a way for the Applier to signal to the Producer that it needs to choose a new sync source.  There&apos;s nothing fundamental preventing it, but the current code structure will probably make it infeasible in the near term I imagine.&lt;/p&gt;</comment>
                            <comment id="1691074" author="milkie" created="Fri, 6 Oct 2017 02:31:24 +0000"  >&lt;p&gt;I&apos;m not sure how this would work &amp;#8211; do you have the information necessary to make a sync source determination in the applier thread?  The current checking is done in the oplog fetcher thread.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="433249">SERVER-31274</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>7.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>Fri, 6 Oct 2017 02:31:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 42 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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1409</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>
                            3 years, 42 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>greg.mckeon@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
            <customfieldvalue>xuerui.fa@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hth6d3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwn6kf:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3768">Repl 2020-04-06</customfieldvalue>
    <customfieldvalue id="3769">Repl 2020-04-20</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|htgsgv:</customfieldvalue>

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