<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:13:42 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-47261] AsyncRequestSender should populate clientOperationKey</title>
                <link>https://jira.mongodb.org/browse/SERVER-47261</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When we create a RemoteCommandRequestOnAny in the ARS &lt;a href=&quot;https://github.com/mongodb/mongo/blob/65f447b27e9b3db0315dd52d97d9e26fa462916c/src/mongo/s/async_requests_sender.cpp#L185-L191&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, we might already have a client operation key in the command BSON. I think the way to fix this is to move the clientOperationKey logic out of the RemoteCommandRequest &lt;a href=&quot;https://github.com/mongodb/mongo/blob/65f447b27e9b3db0315dd52d97d9e26fa462916c/src/mongo/executor/remote_command_request.cpp#L76-L80&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and instead use an ARS-owned clientOperationKey that is added to the metadataObj ahead of time.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1300930">SERVER-47261</key>
            <summary>AsyncRequestSender should populate clientOperationKey</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="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="ben.caimano@mongodb.com">Benjamin Caimano</reporter>
                        <labels>
                            <label>servicearch-wfbf-day</label>
                    </labels>
                <created>Wed, 1 Apr 2020 22:22:11 +0000</created>
                <updated>Tue, 6 Dec 2022 02:30:59 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="4466315" author="max.hirschhorn@10gen.com" created="Fri, 8 Apr 2022 00:33:07 +0000"  >&lt;p&gt;While not being that familar with clientOperationKey and hedged reads, I do want to call out some consideration may need to be given to the current proposal of using the same clientOperationKey as the originating request around sharded $lookup. It is possible to have the following sequence of network messages exchanged as a result of a single client request:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Application run aggregation with {$readPreference: &quot;nearest&quot;} on unsharded collection.&lt;/li&gt;
	&lt;li&gt;Mongos chooses ShardA:node0 as its main target and ShardA:node1 as its hedge target. Let&apos;s pretend ShardA:node0 responds back first.&lt;/li&gt;
	&lt;li&gt;The aggregation does a sharded $lookup which targets ShardB. The pipeline within the sharded $lookup contains another sharded $lookup.&lt;/li&gt;
	&lt;li&gt;ShardA:node0 chooses ShardB:node0 as its main target and ShardB:node1 as its hedge target. Let&apos;s pretend ShardB:node1 responds back first.&lt;/li&gt;
	&lt;li&gt;The aggregation does a sharded $lookup which targets ShardA.&lt;/li&gt;
	&lt;li&gt;ShardB:node1 chooses ShardA:node0 as its main target and ShardA:node1 as its hedge target. Let&apos;s pretend ShardA:node1 responds back first.&lt;/li&gt;
	&lt;li&gt;If ShardB:node1 runs &amp;#95;killOperation on ShardA:node0 using the same clientOperationKey from #2 then the entire aggregation is killed.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;(The nested sharded $lookup isn&apos;t the only way this could happen but is more practical then a $lookup within the same shard not picking the current node as the lowest ping time and it winning the runoff.)&lt;/p&gt;</comment>
                            <comment id="4465488" author="JIRAUSER1262719" created="Thu, 7 Apr 2022 18:56:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=garaudy.etienne&quot; class=&quot;user-hover&quot; rel=&quot;garaudy.etienne&quot;&gt;garaudy.etienne&lt;/a&gt; I&apos;d like to hear from anyone who has continued Ben &amp;amp; Spencer&apos;s work or who has a vested interest in this issue being worked on.&lt;/p&gt;</comment>
                            <comment id="4375687" author="JIRAUSER1262719" created="Thu, 24 Feb 2022 21:55:53 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                            <comment id="3042894" author="ben.caimano" created="Thu, 16 Apr 2020 16:43:38 +0000"  >&lt;p&gt;I mentioned it in passing before but, without this change, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46255&quot; title=&quot;establishCursors/AsyncRequestsSender can leave dangling request if interrupted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46255&quot;&gt;&lt;del&gt;SERVER-46255&lt;/del&gt;&lt;/a&gt; in the presence of hedged reads will incur cursor leakage and wasted work without this. This is not a &quot;just in case&quot; sadly. We also expect the ARS to be used for a superset of the hedged reads whitelist. It&apos;s worth making this more correct within a reasonable timeframe.&lt;/p&gt;</comment>
                            <comment id="3041673" author="spencer" created="Wed, 15 Apr 2020 22:28:31 +0000"  >&lt;p&gt;I don&apos;t really feel like now is a good time to make this change.  I don&apos;t think this should be done until we&apos;re ready to start sending clientOperationKeys on requests outside of hedged reads.  Right now the logic for setting clientOperationKey is very tied into logic around using hedged reads.  The problem is that we make the decision on whether or not to add clientOperationKey based on both the readPreference for the operation as well as the name of the command being run.  While readPreference is shared across all requests in a given ARS, the command being run is not.  This makes it difficult to move the logic for setting clientOperationKey up to the ARS since there really is no way to make the decision on whether or not to set clientOperationKey for the entire ARS, the decision is still fundamentally tied to each individual request, so making the decision at the Request layer makes sense.&lt;/p&gt;

&lt;p&gt;If/when we decide to use clientOperationKey in more places, we will need to make a cohesive plan around what the right layer is to be controlling this and whether or not it is allowed for different requests within the same ARS to have different clientOperationKeys.&lt;/p&gt;

&lt;p&gt;This seems like a change we should make when we have a use case in mind for it to inform our design decisions, rather than doing it now &quot;just in case&quot; we need it down the road, when we don&apos;t have a real idea of the requirements or desired behavior.&lt;/p&gt;

&lt;p&gt;FYI &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ben.caimano&quot; class=&quot;user-hover&quot; rel=&quot;ben.caimano&quot;&gt;ben.caimano&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2019315">SERVER-65329</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1990119">SERVER-63982</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1162368">SERVER-46255</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>5.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_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_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>Wed, 15 Apr 2020 22:28:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 43 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 43 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>ben.caimano@mongodb.com</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@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|hxcx2n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr4bho:k</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="3838">Service arch 2020-04-20</customfieldvalue>
    <customfieldvalue id="3839">Service arch 2020-05-04</customfieldvalue>
    <customfieldvalue id="3840">Service arch 2020-05-18</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|hxcjbz:</customfieldvalue>

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