<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:13:11 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-26780] SyncTail::getMissingDoc() should retry on SocketExceptions</title>
                <link>https://jira.mongodb.org/browse/SERVER-26780</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;A secondary is failing to perform the initial sync with another secondary to join a replica set.&lt;/p&gt;

&lt;p&gt;It fails due to a socket receive timeout when talking to the other secondary during the initial sync.&lt;/p&gt;

&lt;p&gt;I have attached the final lines of the log from the secondary trying to join the replica set.&lt;/p&gt;

&lt;p&gt;NB: we never see any &quot;network problem detected&quot; lines in our logs, so it seems as if there is never any retries:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/db/repl/sync_tail.cpp#L968-L969&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/db/repl/sync_tail.cpp#L968-L969&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think the SocketException due to the timeout is being caught earlier:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/util/net/message_port.cpp#L204-L210&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/util/net/message_port.cpp#L204-L210&lt;/a&gt;&lt;br/&gt;
which then triggers the assertion exception&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/client/dbclient.cpp#L811-L814&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/client/dbclient.cpp#L811-L814&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I do not believe the fix in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9528&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-9528&lt;/a&gt; was correct due to the exception swallowing.&lt;/p&gt;</description>
                <environment>ubuntu, mongo 3.2.10</environment>
        <key id="326892">SERVER-26780</key>
            <summary>SyncTail::getMissingDoc() should retry on SocketExceptions</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="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="rob.clancy@intercom.io">Rob Clancy</reporter>
                        <labels>
                            <label>initialSync</label>
                    </labels>
                <created>Wed, 26 Oct 2016 08:57:56 +0000</created>
                <updated>Mon, 8 Jan 2024 15:23:13 +0000</updated>
                            <resolved>Fri, 13 Sep 2019 13:52:20 +0000</resolved>
                                    <version>3.2.12</version>
                    <version>3.4.2</version>
                    <version>3.5.2</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2419413" author="jesse" created="Fri, 13 Sep 2019 13:52:21 +0000"  >&lt;p&gt;Obviated by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42022&quot; title=&quot;Attempt to remove initial sync missing document fetching&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42022&quot;&gt;&lt;del&gt;SERVER-42022&lt;/del&gt;&lt;/a&gt;: In 4.3+ we no longer fetch missing documents during initial sync.&lt;/p&gt;</comment>
                            <comment id="2418804" author="judah.schvimer" created="Thu, 12 Sep 2019 21:43:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;, this can be closed, correct?&lt;/p&gt;</comment>
                            <comment id="1494491" author="judah.schvimer" created="Tue, 7 Feb 2017 23:15:18 +0000"  >&lt;p&gt;Dear &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rob.clancy%40intercom.io&quot; class=&quot;user-hover&quot; rel=&quot;rob.clancy@intercom.io&quot;&gt;rob.clancy@intercom.io&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for filing this ticket! I think you are correct, that we swallow &lt;tt&gt;SocketExceptions&lt;/tt&gt; in the &lt;tt&gt;MessagingPort&lt;/tt&gt; and then convert them to &lt;tt&gt;DBExceptions&lt;/tt&gt; in &lt;tt&gt;DBClientInterface&lt;/tt&gt;. Thus when we hit &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/db/repl/sync_tail.cpp#L907-L916&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this block&lt;/a&gt; in initial sync fetching missing documents, we do not retry. This code path does not appear to have changed since then, so it is still a problem in 3.2 and 3.4.&lt;/p&gt;

&lt;p&gt;I will move this into &quot;Needs Triage&quot; and change the summary to &quot;SyncTail::getMissingDoc() should retry on SocketExceptions&quot;.&lt;/p&gt;

&lt;p&gt;We handle &lt;tt&gt;SocketExceptions&lt;/tt&gt; separately from &lt;tt&gt;DBExceptions&lt;/tt&gt; here because some &lt;tt&gt;DBExceptions&lt;/tt&gt; will just keep happening no matter what if we retry. One fix would be to simply retry on all exceptions. The cost here seems low because when &lt;tt&gt;getMissingDoc&lt;/tt&gt; fails, it leads to initial sync restarting. Delaying that initial sync restart by a few seconds is a small price to pay for network error resilience. We should only incur that delay once for errors that won&apos;t be fixed by retrying.&lt;/p&gt;

&lt;p&gt;The other fix would be to stop &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.2.10/src/mongo/util/net/message_port.cpp#L204-L211&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;swallowing&lt;/a&gt; &lt;tt&gt;SocketExceptions&lt;/tt&gt;. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mira.carey%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;mira.carey@mongodb.com&quot;&gt;mira.carey@mongodb.com&lt;/a&gt;, do you know why we swallow those exceptions there? &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Judah&lt;/p&gt;</comment>
                            <comment id="1418339" author="rob.clancy@intercom.io" created="Wed, 26 Oct 2016 15:51:08 +0000"  >&lt;p&gt;logs from the secondary which was being synced from&lt;/p&gt;</comment>
                            <comment id="1418301" author="rob.clancy@intercom.io" created="Wed, 26 Oct 2016 15:36:40 +0000"  >&lt;p&gt;Logs from the node that was trying to join the replica set.&lt;/p&gt;</comment>
                            <comment id="1417966" author="ramon.fernandez" created="Wed, 26 Oct 2016 12:39:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rob.clancy%40intercom.io&quot; class=&quot;user-hover&quot; rel=&quot;rob.clancy@intercom.io&quot;&gt;rob.clancy@intercom.io&lt;/a&gt;, I don&apos;t see the logs attached, can you please upload them again? It would be useful to see the failing node as well as the logs for the sync source being used at the time by that node.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="829115">SERVER-42022</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="352632">SERVER-27950</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="142498" name="mms-mongo-1-106.log" size="5190" author="rob.clancy@intercom.io" created="Wed, 26 Oct 2016 15:51:08 +0000"/>
                            <attachment id="142495" name="mms-mongo-1-110.log" size="1368" author="rob.clancy@intercom.io" created="Wed, 26 Oct 2016 15:36:40 +0000"/>
                    </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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 26 Oct 2016 12:39:23 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 21 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-42022'>SERVER-42022</a></s>]]></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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1079</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</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>
                            4 years, 21 weeks, 5 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>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>rob.clancy@intercom.io</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjsk7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9qsn:</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_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|hseepb:</customfieldvalue>

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