<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:55:56 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-84766] Routers target servers with `fsyncLock`</title>
                <link>https://jira.mongodb.org/browse/SERVER-84766</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Our internal client implementation uses &lt;tt&gt;SDAM&lt;/tt&gt;, in particular its server selection logic, to target members of replica-sets in a sharded cluster. Given a set of requirements (e.g. read concern and preference), the selection algorithm will provide a list of eligible servers that can be targeted, excluding servers in an &lt;tt&gt;Unknown&lt;/tt&gt; state or with an RTT that exceeds a configurable window.&lt;/p&gt;

&lt;p&gt;Once &lt;tt&gt;SDAM&lt;/tt&gt; is notified about a failed remote operation, it tags the corresponding server by updating its state to &lt;tt&gt;Unknown&lt;/tt&gt;, so that it cannot be targeted until further notice. This further notice is provided by a observing a successful &lt;tt&gt;hello&lt;/tt&gt; response from the tagged server. This would result in updating the state of the server (e.g. from &lt;tt&gt;Unknown&lt;/tt&gt; to &lt;tt&gt;Secondary&lt;/tt&gt;), but its RTT is set to &lt;tt&gt;HelloRTT::max()&lt;/tt&gt; to make sure it&apos;s not targeted until receiving subsequent &lt;tt&gt;hello&lt;/tt&gt; responses. &lt;tt&gt;RSM&lt;/tt&gt; will also periodically query the remote servers and update RTTs with observed round-trip-times for running &lt;tt&gt;hello&lt;/tt&gt; commands against those servers.&lt;/p&gt;

&lt;p&gt;So far, everything works as expected. However, if the remote server cannot run any CRUD operations (e.g. due to receiving &lt;tt&gt;fsyncLock&lt;/tt&gt;), but is capable of running &lt;tt&gt;hello&lt;/tt&gt; commands, the server selection will still find that server as an eligible target. Let&apos;s consider the following example:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A &lt;tt&gt;mongos&lt;/tt&gt; server queries the server selection algorithm, and receives S1 as an eligible target. S1, however, has received &lt;tt&gt;fsyncLock&lt;/tt&gt; and is not capable of running CRUD operations.&lt;/li&gt;
	&lt;li&gt;Once the query times out, &lt;tt&gt;mongos&lt;/tt&gt; will notify &lt;tt&gt;SDAM&lt;/tt&gt; and tag S1 with &lt;tt&gt;Unknown&lt;/tt&gt;. For now, the server selection algorithm will no longer return S1 as a candidate for running remote commands.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;SDAM&lt;/tt&gt; continues to monitor this server, and is able to run a successful &lt;tt&gt;hello&lt;/tt&gt; against the server, updating its state to &lt;tt&gt;Secondary&lt;/tt&gt; but keeping its RTT to &lt;tt&gt;HelloRTT::max()&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;Meanwhile, &lt;tt&gt;RSM&lt;/tt&gt; is monitoring S1 and will update its RTT to a valid value, so it becomes eligible for selection agian.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;mongos&lt;/tt&gt; tries to run another CRUD operation, and is provided with S1 with an eligible target.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This ticket is a place-holder for investigating this issue and proposing a fix.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2543451">SERVER-84766</key>
            <summary>Routers target servers with `fsyncLock`</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="amirsaman.memaripour@mongodb.com">Amirsaman Memaripour</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Jan 2024 16:39:05 +0000</created>
                <updated>Tue, 16 Jan 2024 21:05:07 +0000</updated>
                                                                            <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                    <issuelinks>
                            <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>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 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_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>phoebe.du@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 weeks, 6 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>amirsaman.memaripour@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-servicearch</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i37t5z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2piuk:</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;ul&gt;
	&lt;li&gt;Start a single shard cluster, with 3 config servers (1 primary and 2 secondaries).&lt;/li&gt;
	&lt;li&gt;Run &lt;tt&gt;fsyncLock&lt;/tt&gt; against one of the config secondaries.&lt;/li&gt;
	&lt;li&gt;Connect to the &lt;tt&gt;mongos&lt;/tt&gt; and run a simple find command (e.g. &lt;tt&gt;db.test.find({})&lt;/tt&gt;).&lt;/li&gt;
	&lt;li&gt;Keep running the command until it blocks for a few seconds and then times out.&lt;/li&gt;
	&lt;li&gt;I have been able to reliably reproduce this using v5.0.20.&lt;/li&gt;
&lt;/ul&gt;
</customfieldvalue>

                        </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|i37fbb:</customfieldvalue>

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