<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:14:47 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-69918] Produce upsert document in _clusterQueryWithoutShardKey</title>
                <link>https://jira.mongodb.org/browse/SERVER-69918</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;On upsert:true and no matches found for a document, return the necessary upsert document to insert on a shard.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2143742">SERVER-69918</key>
            <summary>Produce upsert document in _clusterQueryWithoutShardKey</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="sanika.phanse@mongodb.com">Sanika Phanse</assignee>
                                    <reporter username="jason.zhang@mongodb.com">Jason Zhang</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Sep 2022 22:06:08 +0000</created>
                <updated>Sun, 29 Oct 2023 21:32:54 +0000</updated>
                            <resolved>Fri, 24 Feb 2023 21:53:22 +0000</resolved>
                                                    <fixVersion>7.0.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5230561" author="xgen-internal-githook" created="Sat, 25 Feb 2023 03:38:23 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Sanika Phanse&apos;, &apos;email&apos;: &apos;sanika.phanse@mongodb.com&apos;, &apos;username&apos;: &apos;sphanse99&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69918&quot; title=&quot;Produce upsert document in _clusterQueryWithoutShardKey&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69918&quot;&gt;&lt;del&gt;SERVER-69918&lt;/del&gt;&lt;/a&gt; Produce upsert document in _clusterQueryWithoutShardKey&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8a53ac6194cbd298e517fc4102263facf9f66ede&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8a53ac6194cbd298e517fc4102263facf9f66ede&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5101094" author="JIRAUSER1253438" created="Mon, 9 Jan 2023 21:35:48 +0000"  >&lt;p&gt;While waiting for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72198&quot; title=&quot;Separate query_exec executable in scons&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72198&quot;&gt;&lt;del&gt;SERVER-72198&lt;/del&gt;&lt;/a&gt;, I tried using the `query_exec` binary directly in &lt;a href=&quot;https://github.com/10gen/mongo/blob/6cf6ca9c9a7a3e3fe1de05c8ff5e4ddb19829e1f/src/mongo/s/commands/SConscript#L25&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;`cluster_commands`&lt;/a&gt; library as a quick fix, but this failed with errors related to cursor server status metrics conflicts caused by &lt;a href=&quot;https://github.com/10gen/mongo/blob/6cf6ca9c9a7a3e3fe1de05c8ff5e4ddb19829e1f/src/mongo/db/SConscript#L1374-L1375&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;these files&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Paired with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=arun.banala%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;arun.banala@mongodb.com&quot;&gt;arun.banala@mongodb.com&lt;/a&gt; today to separate the cursor files into a separate binary, but found that the difficulty to do this is comparable with that of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72198&quot; title=&quot;Separate query_exec executable in scons&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72198&quot;&gt;&lt;del&gt;SERVER-72198&lt;/del&gt;&lt;/a&gt;. Since &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72198&quot; title=&quot;Separate query_exec executable in scons&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72198&quot;&gt;&lt;del&gt;SERVER-72198&lt;/del&gt;&lt;/a&gt; is the more correct solution, we have decided to increase the priority for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72198&quot; title=&quot;Separate query_exec executable in scons&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72198&quot;&gt;&lt;del&gt;SERVER-72198&lt;/del&gt;&lt;/a&gt; instead and will circle back to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69918&quot; title=&quot;Produce upsert document in _clusterQueryWithoutShardKey&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69918&quot;&gt;&lt;del&gt;SERVER-69918&lt;/del&gt;&lt;/a&gt; when it&apos;s done. If &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72198&quot; title=&quot;Separate query_exec executable in scons&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72198&quot;&gt;&lt;del&gt;SERVER-72198&lt;/del&gt;&lt;/a&gt; ultimately proves unfeasible, we will revisit moving the &lt;a href=&quot;https://github.com/10gen/mongo/blob/6cf6ca9c9a7a3e3fe1de05c8ff5e4ddb19829e1f/src/mongo/db/SConscript#L1374-L1375&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongod cursor stats files&lt;/a&gt; into a separate binary.&lt;/p&gt;

&lt;p&gt;I&apos;m reopening this ticket, pending &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-72198&quot; title=&quot;Separate query_exec executable in scons&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-72198&quot;&gt;&lt;del&gt;SERVER-72198&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="5020533" author="JIRAUSER1253438" created="Wed, 30 Nov 2022 22:36:29 +0000"  >&lt;p&gt;Bringing upsert_stage.cpp into mongos&apos;s scope in order to use a modified version of produceNewDocumentForInsert() when no matching documents &amp;amp; &lt;/p&gt;
{upsert:true}
&lt;p&gt; is detected here. To do this, make a series of functions static:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;(1)&lt;/b&gt; UpsertStage::produceNewDocumentForInsert()&lt;br/&gt;
(2) UpdateDriver::populateDocumentWithQueryFields (called in (1))&lt;/p&gt;

&lt;p&gt;Currently, &lt;b&gt;(1)&lt;/b&gt; functions as follows:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;(1) Creates a list of &quot;immutable paths&quot;, namely _id &amp;amp; shard key in some cases (shard key restrictions will not apply for this project)&lt;/li&gt;
	&lt;li&gt;(2) Creates a &quot;pre-image&quot; document using the request query.&lt;/li&gt;
	&lt;li&gt;(3) Generate post-image following a strategy for replacement style updates and a strategy for all other updates&lt;/li&gt;
	&lt;li&gt;(4) Validates and returns.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The logic in &lt;b&gt;(1)&lt;/b&gt; can be simplified as we can make a few assumptions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The collection is sharded&lt;/li&gt;
	&lt;li&gt;No locks should be acquired&lt;/li&gt;
	&lt;li&gt;Only _id is immutable&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2214153">SERVER-72198</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2231986">SERVER-72806</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2245771">SERVER-73417</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.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>Wed, 16 Nov 2022 05:12:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        49 weeks, 5 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-1632</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>
                            49 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.zhang@mongodb.com</customfieldvalue>
            <customfieldvalue>sanika.phanse@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1bg1b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0tmps:0w</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6350">Sharding 2022-10-17</customfieldvalue>
    <customfieldvalue id="6354">Sharding 2022-12-12</customfieldvalue>
    <customfieldvalue id="6355">Sharding NYC 2022-12-26</customfieldvalue>
    <customfieldvalue id="6356">Sharding NYC 2023-01-09</customfieldvalue>
    <customfieldvalue id="6865">Sharding NYC 2023-01-23</customfieldvalue>
    <customfieldvalue id="6866">Sharding NYC 2023-02-06</customfieldvalue>
    <customfieldvalue id="6867">Sharding NYC 2023-02-20</customfieldvalue>
    <customfieldvalue id="6868">Sharding NYC 2023-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|i1b26n:</customfieldvalue>

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