<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:32:36 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-13702] Commands without optional query may target to wrong shards on mongos</title>
                <link>https://jira.mongodb.org/browse/SERVER-13702</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;On mongos, for commands allowing optional query, e.g. count, mapreduce, if the optional query is not given, the command will use the command BSONObj itself as the query to target shards, which could return wrong shards if the shard key happens to be one of the field in the command object.&lt;/p&gt;

&lt;p&gt;This is because if the optional query is not given, commands call &lt;tt&gt;Strategy::commandOp&lt;/tt&gt; with an empty &lt;tt&gt;targetingQuery&lt;/tt&gt; parameter. The &lt;tt&gt;targetingQuery&lt;/tt&gt; parameter is passed to &lt;tt&gt;ParallelSortClusteredCursor&lt;/tt&gt; as &lt;tt&gt;CommandInfo.cmdFilter&lt;/tt&gt;. An empty &lt;tt&gt;cmdFilter&lt;/tt&gt; will be interpreted as using the command/query as a whole to target shards.&lt;/p&gt;</description>
                <environment></environment>
        <key id="132940">SERVER-13702</key>
            <summary>Commands without optional query may target to wrong shards on mongos</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="siyuan.zhou@mongodb.com">Siyuan Zhou</assignee>
                                    <reporter username="siyuan.zhou@mongodb.com">Siyuan Zhou</reporter>
                        <labels>
                            <label>cap-ticket-needed</label>
                    </labels>
                <created>Wed, 23 Apr 2014 20:02:35 +0000</created>
                <updated>Fri, 19 Jun 2015 17:33:40 +0000</updated>
                            <resolved>Thu, 18 Sep 2014 00:26:47 +0000</resolved>
                                                    <fixVersion>2.6.5</fixVersion>
                    <fixVersion>2.7.7</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="721478" author="xgen-internal-githook" created="Thu, 18 Sep 2014 00:22:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visualzhou&apos;, u&apos;name&apos;: u&apos;Siyuan Zhou&apos;, u&apos;email&apos;: u&apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13702&quot; title=&quot;Commands without optional query may target to wrong shards on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13702&quot;&gt;&lt;del&gt;SERVER-13702&lt;/del&gt;&lt;/a&gt; Commands without optional query may target to wrong shards on mongos&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bd1a02385378ee50a33db7c255217c050cc74192)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13702&quot; title=&quot;Commands without optional query may target to wrong shards on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13702&quot;&gt;&lt;del&gt;SERVER-13702&lt;/del&gt;&lt;/a&gt; Add JS tests for shard targeting.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e986b037f1301fae63938dc9bd933ff8ac25b7d6)&lt;br/&gt;
Branch: v2.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0cf60aa0af55a673786d4950c4b5524c1d671e6e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0cf60aa0af55a673786d4950c4b5524c1d671e6e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="721477" author="xgen-internal-githook" created="Thu, 18 Sep 2014 00:22:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visualzhou&apos;, u&apos;name&apos;: u&apos;Siyuan Zhou&apos;, u&apos;email&apos;: u&apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13702&quot; title=&quot;Commands without optional query may target to wrong shards on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13702&quot;&gt;&lt;del&gt;SERVER-13702&lt;/del&gt;&lt;/a&gt; Commands without optional query may target to wrong shards on mongos&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bd1a02385378ee50a33db7c255217c050cc74192)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13702&quot; title=&quot;Commands without optional query may target to wrong shards on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13702&quot;&gt;&lt;del&gt;SERVER-13702&lt;/del&gt;&lt;/a&gt; Add JS tests for shard targeting.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e986b037f1301fae63938dc9bd933ff8ac25b7d6)&lt;br/&gt;
Branch: v2.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0cf60aa0af55a673786d4950c4b5524c1d671e6e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0cf60aa0af55a673786d4950c4b5524c1d671e6e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="721068" author="xgen-internal-githook" created="Wed, 17 Sep 2014 18:22:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visualzhou&apos;, u&apos;name&apos;: u&apos;Siyuan Zhou&apos;, u&apos;email&apos;: u&apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13702&quot; title=&quot;Commands without optional query may target to wrong shards on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13702&quot;&gt;&lt;del&gt;SERVER-13702&lt;/del&gt;&lt;/a&gt; Add JS tests for shard targeting.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e986b037f1301fae63938dc9bd933ff8ac25b7d6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e986b037f1301fae63938dc9bd933ff8ac25b7d6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="719415" author="siyuan.zhou@10gen.com" created="Mon, 15 Sep 2014 22:48:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=greg_10gen&quot; class=&quot;user-hover&quot; rel=&quot;greg_10gen&quot;&gt;greg_10gen&lt;/a&gt;, I am working on the JS tests. Sorry for missing it at the first time. I forgot why we don&apos;t backport this issue to 2.6, but v2.6 has the same bug.&lt;/p&gt;</comment>
                            <comment id="565978" author="xgen-internal-githook" created="Mon, 28 Apr 2014 20:01:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visualzhou&apos;, u&apos;name&apos;: u&apos;Siyuan Zhou&apos;, u&apos;email&apos;: u&apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13702&quot; title=&quot;Commands without optional query may target to wrong shards on mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13702&quot;&gt;&lt;del&gt;SERVER-13702&lt;/del&gt;&lt;/a&gt; Commands without optional query may target to wrong shards on mongos&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bd1a02385378ee50a33db7c255217c050cc74192&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bd1a02385378ee50a33db7c255217c050cc74192&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="132086">SERVER-13656</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10220">
                    <name>Tested</name>
                                            <outwardlinks description="tested by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="42033" name="sh_count.js" size="1151" author="siyuan.zhou@mongodb.com" created="Wed, 23 Apr 2014 20:02:35 +0000"/>
                            <attachment id="42035" name="sh_mr.js" size="1329" author="siyuan.zhou@mongodb.com" created="Wed, 23 Apr 2014 20:31:11 +0000"/>
                    </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_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="14192">2.6.5</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>Mon, 28 Apr 2014 20:01:23 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 22 weeks 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>ramon.fernandez@mongodb.com</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hryad3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>114222</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;p&gt;Run attached script for &lt;tt&gt;count&lt;/tt&gt; and &lt;tt&gt;mapReduce&lt;/tt&gt;&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11857"><![CDATA[Requested]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsgyhz:</customfieldvalue>

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