<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:12:19 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-26494] remove unreachable else-branch in sync_source_feedback.cpp logic</title>
                <link>https://jira.mongodb.org/browse/SERVER-26494</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/4b675f39d1a3e911a3a0e34340294080c510c85b/src/mongo/db/repl/sync_source_feedback.cpp#L130&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;This block of code&lt;/a&gt; has 2 if-statements which will cover all cases, preventing the else-branch which blacklists the current sync source from ever being reached.&lt;/p&gt;

&lt;p&gt;This code is new in 3.3&lt;/p&gt;</description>
                <environment></environment>
        <key id="321472">SERVER-26494</key>
            <summary>remove unreachable else-branch in sync_source_feedback.cpp logic</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="benety.goh@mongodb.com">Benety Goh</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Oct 2016 23:06:30 +0000</created>
                <updated>Sat, 13 Jul 2019 05:58:51 +0000</updated>
                            <resolved>Tue, 28 Feb 2017 16:04:02 +0000</resolved>
                                                    <fixVersion>3.5.4</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2324141" author="siyuan.zhou@10gen.com" created="Sat, 13 Jul 2019 05:58:51 +0000"  >&lt;p&gt;The following commit is part of this ticket but has a wrong SERVER number, so I posted it here.&lt;/p&gt;

&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;benety&apos;, u&apos;name&apos;: u&apos;Benety Goh&apos;, u&apos;email&apos;: u&apos;benety@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26484&quot; title=&quot;Black-list jumbo1.js from continuous stepdown suite on 3.2 branch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26484&quot;&gt;&lt;del&gt;SERVER-26484&lt;/del&gt;&lt;/a&gt; removed unreachable code in SyncSourceFeedback. Blacklisting of reporter sync source will be done in BackgroundSync and SyncSourceResolver.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b690ca960b5062ee5b8af034ffe338051a228431&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b690ca960b5062ee5b8af034ffe338051a228431&lt;/a&gt;&lt;/p&gt;
</comment>
                            <comment id="1511319" author="xgen-internal-githook" created="Tue, 28 Feb 2017 16:03:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;benety&apos;, u&apos;name&apos;: u&apos;Benety Goh&apos;, u&apos;email&apos;: u&apos;benety@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26494&quot; title=&quot;remove unreachable else-branch in sync_source_feedback.cpp logic&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26494&quot;&gt;&lt;del&gt;SERVER-26494&lt;/del&gt;&lt;/a&gt; removed unused function arguments from SyncSourceFeedback&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d63633540dd66d7b1830a257fd178c2fd38272b9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d63633540dd66d7b1830a257fd178c2fd38272b9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1507727" author="spencer" created="Thu, 23 Feb 2017 22:09:15 +0000"  >&lt;p&gt;Okay then, feel free to update this ticket to be about removing the dead code rather than fixing it&lt;/p&gt;</comment>
                            <comment id="1507590" author="benety.goh" created="Thu, 23 Feb 2017 20:31:48 +0000"  >&lt;p&gt;I can confirm that NotMasterOrSecondary errors caused by replSetMaintenance are handled correctly in BackgroundSync and SyncSourceFeedback:&lt;/p&gt;

&lt;p&gt;On a chaining replica set setup n1 (pri) &amp;lt;- n2 (sec) &amp;lt;- n3 (sec),&lt;/p&gt;

&lt;p&gt;running &lt;/p&gt;
{ replSetMaintenance: true }
&lt;p&gt; on n2 will cause the oplog fetcher on n3 to fail with the following message:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2017-02-23T15:13:54.144-0500 W REPL     [rsBackgroundSync] Fetcher stopped querying remote oplog with error: InvalidSyncSource: sync source &amp;lt;n2&amp;gt; (config version: 5; last applied optime: { ts: Timestamp 1487880823000|1, t: 3 }; sync source index: -1; primary index: 0) is no longer valid&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;BackgroundSync clears its sync source and this leads to the Reporter in SyncSourceFeedback returning with an error when it detects that the sync source is no longer valid:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2017-02-23T15:13:54.162-0500 I REPL     [SyncSourceFeedback] SyncSourceFeedback error sending update to &amp;lt;n2&amp;gt;: InvalidSyncSource: Sync source was cleared. Was &amp;lt;n2&amp;gt;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Eventually, n3 selects n1 as its sync source and we go back to having a stable replica set:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2017-02-23T15:15:17.392-0500 I REPL     [rsBackgroundSync] sync source candidate: &amp;lt;n1&amp;gt;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
</comment>
                            <comment id="1507550" author="spencer" created="Thu, 23 Feb 2017 20:07:12 +0000"  >&lt;p&gt;Yeah, okay, I&apos;m mostly convinced.  The only last thing I&apos;d want to confirm is that NotMasterOrSecondary errors caused by something other than a config change (for example by a node having replSetMaintenance called on it) will also be correctly handled outside of sync_source_feedback&lt;/p&gt;</comment>
                            <comment id="1506437" author="benety.goh" created="Wed, 22 Feb 2017 20:16:17 +0000"  >&lt;p&gt;It seems that the common cause for the remote replSetUpdatePosition failing with those error codes NodeNotFound,NotMasterOrSecondary and InvalidReplicaSetConfig would be a change in config. Config changes currently will cause the oplog fetcher to fail because it will detect a change in the config version contained in the oplog query metadata. Subsequently, after exiting the oplog fetcher, we will go back to the  sync source resolver which has its own blacklisting logic.&lt;/p&gt;

&lt;p&gt;IMO, it&apos;d be beneficial to centralize our blacklisting criteria in one location.&lt;/p&gt;</comment>
                            <comment id="1498235" author="spencer" created="Mon, 13 Feb 2017 22:56:41 +0000"  >&lt;p&gt;Should we just swallow network exceptions like we do InvalidSyncSource and NodeNotFound?  Conversely, is there a specific set of codes we should be looking for and blacklisting based on?&lt;/p&gt;

&lt;p&gt;From a very cursory skim of the code for the replSetUpdatePosition command, it looks like it can fail with NodeNotFound, NotMasterOrSecondary, and InvalidReplicaSetConfig at least, and the latter two of those at least seem worthwhile to blacklist based on?  Actually, we should probably also blacklist on NodeNotFound, the problem is we can&apos;t currently distinguish between a NodeNotFound error that we generated when trying to construct the update position command and a NodeNotFound received over the network from the sync source from it processing the update position command.&lt;/p&gt;</comment>
                            <comment id="1495496" author="judah.schvimer" created="Wed, 8 Feb 2017 22:09:03 +0000"  >&lt;p&gt;I think it&apos;s probably fine to rely on BackgroundSync to do blacklisting.&lt;/p&gt;</comment>
                            <comment id="1495467" author="benety.goh" created="Wed, 8 Feb 2017 21:41:15 +0000"  >&lt;p&gt;Blacklist the sync source on a failed Reporter command may interfere with the retry logic added to the OplogFetcher in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-25702&quot; title=&quot;add support to OplogFetcher for restarting oplog query&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-25702&quot;&gt;&lt;del&gt;SERVER-25702&lt;/del&gt;&lt;/a&gt;. We may prematurely blacklist a sync source due to an intermittent network issue. If the sync source really is unreachable, we would blacklist it anyway when looking for a new sync source in BackgroundSync after exiting OplogFetcher.&lt;/p&gt;

&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;, &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;, thoughts?&lt;/p&gt;</comment>
                            <comment id="1473898" author="benety.goh" created="Tue, 10 Jan 2017 20:09:54 +0000"  >&lt;p&gt;Those !=  should be ==.&lt;/p&gt;</comment>
                            <comment id="1428715" author="spencer" created="Mon, 7 Nov 2016 23:16:13 +0000"  >&lt;p&gt;Benety, can you take a look at this and see if there&apos;s a potential bug here?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="173013">SERVER-16441</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="310402">SERVER-25702</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="170686">SERVER-16272</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="195928">SERVER-18029</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="271803">SERVER-23085</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>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.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, 10 Jan 2017 20:09:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 30 weeks, 4 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 30 weeks, 4 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>benety.goh@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrju3j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrb4e7:</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="1311">Repl 2016-12-12</customfieldvalue>
    <customfieldvalue id="1313">Repl 2017-01-23</customfieldvalue>
    <customfieldvalue id="1450">Repl 2017-02-13</customfieldvalue>
    <customfieldvalue id="1453">Repl 2017-03-06</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|hseh8f:</customfieldvalue>

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