<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:46: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-59290] Re-evaluate sync source after incrementing config version</title>
                <link>https://jira.mongodb.org/browse/SERVER-59290</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;During sync source selection, we attempt to choose a sync source that is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/811251543cb0ad333c6018f5b53717784a863ef3/src/mongo/db/repl/topology_coordinator.cpp#L458-L473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;not hidden and is a voter if we are a voter&lt;/a&gt;. However, it seems possible to do a reconfig to make our sync source non-voting or hidden. It may be an improvement to re-evaluate our sync source if we discover that our sync source has been modified in this way.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1849007">SERVER-59290</key>
            <summary>Re-evaluate sync source after incrementing config version</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="gabriel.marks@mongodb.com">Gabriel Marks</assignee>
                                    <reporter username="xuerui.fa@mongodb.com">Xuerui Fa</reporter>
                        <labels>
                            <label>former-quick-wins</label>
                    </labels>
                <created>Wed, 11 Aug 2021 15:32:43 +0000</created>
                <updated>Sun, 29 Oct 2023 21:49:38 +0000</updated>
                            <resolved>Thu, 6 Jan 2022 21:20:20 +0000</resolved>
                                                    <fixVersion>5.3.0</fixVersion>
                    <fixVersion>5.0.7</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4419281" author="xgen-internal-githook" created="Thu, 17 Mar 2022 19:24:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gabriel Marks&apos;, &apos;email&apos;: &apos;gabriel.marks@mongodb.com&apos;, &apos;username&apos;: &apos;marksg07&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59290&quot; title=&quot;Re-evaluate sync source after incrementing config version&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59290&quot;&gt;&lt;del&gt;SERVER-59290&lt;/del&gt;&lt;/a&gt; Improve criteria for shouldChangeSyncSource&lt;/p&gt;

&lt;p&gt;(cherry picked from commit a7bf9b5c81e43595d3548b000f5910852eefe6b3)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c0b449903ffccd423737c262d3b5afd73fa36ea8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c0b449903ffccd423737c262d3b5afd73fa36ea8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4279280" author="xgen-internal-githook" created="Thu, 6 Jan 2022 19:55:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gabriel Marks&apos;, &apos;email&apos;: &apos;gabriel.marks@mongodb.com&apos;, &apos;username&apos;: &apos;marksg07&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59290&quot; title=&quot;Re-evaluate sync source after incrementing config version&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59290&quot;&gt;&lt;del&gt;SERVER-59290&lt;/del&gt;&lt;/a&gt; Improve criteria for shouldChangeSyncSource&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a7bf9b5c81e43595d3548b000f5910852eefe6b3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a7bf9b5c81e43595d3548b000f5910852eefe6b3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4003081" author="samy.lanka" created="Tue, 17 Aug 2021 03:20:42 +0000"  >&lt;p&gt;The behavior to re-evaluate the sync source as a part of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/v4.4/src/mongo/db/repl/topology_coordinator.cpp#L2908&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;shouldChangeSyncSource&lt;/tt&gt;&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9c13c4f4fc60066b326146f9b52a28ea8ad5d164/src/mongo/db/repl/oplog_fetcher.cpp#L866-L875&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;existed prior&lt;/a&gt; to the Periodically Re-evaluate Sync Sources project, so it is backportable (although the code was refactored a lot as a part of that project, so it might not be simple). I am more of a fan of changing &lt;tt&gt;shouldChangeSyncSource&lt;/tt&gt; for the reasons Judah mentioned above. &lt;/p&gt;</comment>
                            <comment id="4003059" author="judah.schvimer" created="Tue, 17 Aug 2021 02:37:02 +0000"  >&lt;p&gt;I think the &lt;tt&gt;newlyAdded&lt;/tt&gt; reconfigs are infrequent enough that I&apos;m not so concerned about them. That said, I think we should differentiate re-evaluating our sync source (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/72e66213c2c3eab37d9358d5e78ad7f5c1d0d0d7/src/mongo/db/repl/topology_coordinator.cpp#L2884&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;shouldChangeSyncSource&lt;/tt&gt;&lt;/a&gt; if I&apos;m correct) from clearing our sync source and choosing a new one (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/72e66213c2c3eab37d9358d5e78ad7f5c1d0d0d7/src/mongo/db/repl/topology_coordinator.cpp#L201&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;chooseNewSyncSource&lt;/tt&gt;&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;I think we have 2 options:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;clear our sync source and choose a new one on every config version change (maybe with an optimization around &lt;tt&gt;newlyAdded&lt;/tt&gt; changes or changes that don&apos;t have a meaningful impact on sync source selection).&lt;/li&gt;
	&lt;li&gt;change &lt;tt&gt;shouldChangeSyncSource&lt;/tt&gt; to return &lt;tt&gt;true&lt;/tt&gt; if one of the criteria is met that would prohibit a sync source from being chosen in &lt;tt&gt;chooseNewSyncSource&lt;/tt&gt;. Ideally these two code paths would consult a shared utility for the acceptability of a given sync source, though that might be difficult in the implementation.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I&apos;m a fan of changing &lt;tt&gt;shouldChangeSyncSource&lt;/tt&gt; personally since I think it&apos;s less disruptive and we consult it on every batch in 5.0+. The one caveat is that this solution is not backportable before 5.0 since &quot;Periodically Re-evaluate Sync Sources&quot; was implemented on 5.0. The other change to clear our sync source and choose a new one on config version changes is backportable fairly easily if that&apos;s a strong desire. I&apos;m not convinced this is a bad enough behavior though to warrant a backport.&lt;/p&gt;</comment>
                            <comment id="4002460" author="xuerui.fa" created="Mon, 16 Aug 2021 19:32:18 +0000"  >&lt;p&gt;We &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1f64d42977db0572b08d7ab19133bc3f21323ce0/src/mongo/db/repl/replication_coordinator_impl.cpp#L3872&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;increment the config version as part of the reconfig to remove &lt;tt&gt;newlyAdded&lt;/tt&gt; fields&lt;/a&gt; starting from 5.0. Maybe it could be a bit of an optimization to re-evaluate only if the config version was incremented and the new config does not contain the &lt;tt&gt;newlyAdded&lt;/tt&gt; field? CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=samy.lanka&quot; class=&quot;user-hover&quot; rel=&quot;samy.lanka&quot;&gt;samy.lanka&lt;/a&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; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matthew.russotto&quot; class=&quot;user-hover&quot; rel=&quot;matthew.russotto&quot;&gt;matthew.russotto&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4002383" author="xuerui.fa" created="Mon, 16 Aug 2021 19:16:00 +0000"  >&lt;p&gt;In Triage, we determined that this ticket should implement re-evaluating our sync source every time we increase our config version, since increasing the config version indicates that our sync source may have been changed. Since reconfigs are relatively infrequent, this should not impact performance substantially.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="21777"><![CDATA[v5.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>Tue, 17 Aug 2021 02:37:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 46 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-2480</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>
                            1 year, 46 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gabriel.marks@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>samy.lanka@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|hzxdiv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2m5z:</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="5530">Replication 2021-12-13</customfieldvalue>
    <customfieldvalue id="5531">Replication 2021-12-27</customfieldvalue>
    <customfieldvalue id="5532">Replication 2022-01-10</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|hzwzrr:</customfieldvalue>

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