<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:08:40 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-5365] range query on shard key incorrectly sends query to extra shard(s)</title>
                <link>https://jira.mongodb.org/browse/SERVER-5365</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;printShardingStatus(true) says a certain range of shard key ids fall within a single shard:&lt;/p&gt;

&lt;p&gt;...&lt;/p&gt;
{ &quot;my_id&quot; : 13165 }
&lt;p&gt; --&amp;gt;&amp;gt; &lt;/p&gt;
{ &quot;my_id&quot; : 13200 }
&lt;p&gt; on : shard4 &lt;/p&gt;
{ &quot;t&quot; : 68000, &quot;i&quot; : 0 }
{ &quot;my_id&quot; : 13200 }
&lt;p&gt; --&amp;gt;&amp;gt; &lt;/p&gt;
{ &quot;my_id&quot; : 13540 }
&lt;p&gt; on : shard3 &lt;/p&gt;
{ &quot;t&quot; : 69000, &quot;i&quot; : 0 }
&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;i am taking this to mean [13165, 13200) exists on shard4, while [13200, 13540) exist on shard3 based on:&lt;/p&gt;


&lt;p&gt;db.coll.find(&lt;/p&gt;
{my_id:13200}
&lt;p&gt;).explain()&lt;br/&gt;
{&lt;br/&gt;
	&quot;clusteredType&quot; : &quot;ParallelSort&quot;,&lt;br/&gt;
	&quot;shards&quot; : {&lt;br/&gt;
		&quot;shard3/10.177.210.46:27017,10.177.210.47:27017&quot; : [&lt;br/&gt;
			{&lt;br/&gt;
				&quot;cursor&quot; : &quot;BtreeCursor my_id_1&quot;,&lt;br/&gt;
				&quot;nscanned&quot; : 616,&lt;br/&gt;
				&quot;nscannedObjects&quot; : 616,&lt;br/&gt;
				&quot;n&quot; : 616,&lt;br/&gt;
				&quot;millis&quot; : 2,&lt;br/&gt;
				&quot;nYields&quot; : 0,&lt;br/&gt;
				&quot;nChunkSkips&quot; : 0,&lt;br/&gt;
				&quot;isMultiKey&quot; : false,&lt;br/&gt;
				&quot;indexOnly&quot; : false,&lt;br/&gt;
				&quot;indexBounds&quot; : &lt;/p&gt;
{
					&quot;my_id&quot; : [
						[
							13200,
							13200
						]
					]
				}
&lt;p&gt;			}&lt;br/&gt;
		]&lt;br/&gt;
	},&lt;br/&gt;
	&quot;n&quot; : 616,&lt;br/&gt;
	&quot;nChunkSkips&quot; : 0,&lt;br/&gt;
	&quot;nYields&quot; : 0,&lt;br/&gt;
	&quot;nscanned&quot; : 616,&lt;br/&gt;
	&quot;nscannedObjects&quot; : 616,&lt;br/&gt;
	&quot;millisTotal&quot; : 2,&lt;br/&gt;
	&quot;millisAvg&quot; : 2,&lt;br/&gt;
	&quot;numQueries&quot; : 1,&lt;br/&gt;
	&quot;numShards&quot; : 1&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;therefore i would expect the range query: {&quot;my_id&quot;:{&quot;$gte&quot;:13165,&quot;$lt&quot;:13200}} to be sent only to shard4, however that is not the case:&lt;/p&gt;

&lt;p&gt;db.coll.find({my_id:{&apos;$gte&apos;:13165,&apos;$lt&apos;:13200}}).explain()&lt;br/&gt;
{&lt;br/&gt;
	&quot;clusteredType&quot; : &quot;ParallelSort&quot;,&lt;br/&gt;
	&quot;shards&quot; : {&lt;br/&gt;
		&quot;shard3/10.177.210.46:27017,10.177.210.47:27017&quot; : [&lt;br/&gt;
			{&lt;br/&gt;
				&quot;cursor&quot; : &quot;BtreeCursor my_id_1&quot;,&lt;br/&gt;
				&quot;nscanned&quot; : 0,&lt;br/&gt;
				&quot;nscannedObjects&quot; : 0,&lt;br/&gt;
				&quot;n&quot; : 0,&lt;br/&gt;
				&quot;millis&quot; : 0,&lt;br/&gt;
				&quot;nYields&quot; : 0,&lt;br/&gt;
				&quot;nChunkSkips&quot; : 0,&lt;br/&gt;
				&quot;isMultiKey&quot; : false,&lt;br/&gt;
				&quot;indexOnly&quot; : false,&lt;br/&gt;
				&quot;indexBounds&quot; : &lt;/p&gt;
{
					&quot;my_id&quot; : [
						[
							13165,
							13200
						]
					]
				}
&lt;p&gt;			}&lt;br/&gt;
		],&lt;br/&gt;
		&quot;shard4/10.176.64.155:27017,10.177.205.133:27017&quot; : [&lt;br/&gt;
			{&lt;br/&gt;
				&quot;cursor&quot; : &quot;BtreeCursor my_id_1&quot;,&lt;br/&gt;
				&quot;nscanned&quot; : 9248,&lt;br/&gt;
				&quot;nscannedObjects&quot; : 9248,&lt;br/&gt;
				&quot;n&quot; : 9248,&lt;br/&gt;
				&quot;millis&quot; : 45,&lt;br/&gt;
				&quot;nYields&quot; : 0,&lt;br/&gt;
				&quot;nChunkSkips&quot; : 0,&lt;br/&gt;
				&quot;isMultiKey&quot; : false,&lt;br/&gt;
				&quot;indexOnly&quot; : false,&lt;br/&gt;
				&quot;indexBounds&quot; : &lt;/p&gt;
{
					&quot;my_id&quot; : [
						[
							13165,
							13200
						]
					]
				}
&lt;p&gt;			}&lt;br/&gt;
		]&lt;br/&gt;
	},&lt;br/&gt;
	&quot;n&quot; : 9248,&lt;br/&gt;
	&quot;nChunkSkips&quot; : 0,&lt;br/&gt;
	&quot;nYields&quot; : 0,&lt;br/&gt;
	&quot;nscanned&quot; : 9248,&lt;br/&gt;
	&quot;nscannedObjects&quot; : 9248,&lt;br/&gt;
	&quot;millisTotal&quot; : 45,&lt;br/&gt;
	&quot;millisAvg&quot; : 22,&lt;br/&gt;
	&quot;numQueries&quot; : 2,&lt;br/&gt;
	&quot;numShards&quot; : 2&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;it should go only to shard4 no?&lt;/p&gt;</description>
                <environment>ubuntu 10.04 lts, x86_64</environment>
        <key id="33574">SERVER-5365</key>
            <summary>range query on shard key incorrectly sends query to extra shard(s)</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="wayne530">Y. Wayne Huang</reporter>
                        <labels>
                            <label>query</label>
                            <label>sharding</label>
                    </labels>
                <created>Thu, 22 Mar 2012 20:37:25 +0000</created>
                <updated>Tue, 10 Dec 2019 16:29:18 +0000</updated>
                            <resolved>Fri, 2 May 2014 20:50:25 +0000</resolved>
                                    <version>2.0.3</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="232910">SERVER-20768</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="29240">SERVER-4791</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>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 22 Mar 2012 21:11:56 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 47 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-34</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>asya.kamsky@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 47 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </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>wayne530</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro8vj:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4870</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|hszurb:</customfieldvalue>

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