<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:55:27 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-889] sharding by &quot;_id&quot; dosen&apos;t work for gridfs chunks</title>
                <link>https://jira.mongodb.org/browse/SERVER-889</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Initialization:&lt;br/&gt;
scorpius$./mongod --dbpath /data/db/a --port 2048&lt;br/&gt;
scorpius$./mongod --dbpath /data/db/config  --port 2049&lt;br/&gt;
scorpius$./mongos  --configdb localhost:2049&lt;br/&gt;
andro3$./mongod --dbpath /data/db/c/ --port 2048&lt;br/&gt;
scorpius$./mongo&lt;br/&gt;
scorpius ~/tmp/mongodb-linux-i686-2009-10-16/bin $./mongo&lt;br/&gt;
MongoDB shell version: 1.1.2-&lt;br/&gt;
url: test&lt;br/&gt;
connecting to: test&lt;br/&gt;
type &quot;help&quot; for help&lt;br/&gt;
&amp;gt; use admin&lt;br/&gt;
switched to db admin&lt;br/&gt;
&amp;gt; db.runCommand( &lt;/p&gt;
{ addshard : &quot;andro3:2048&quot; }
&lt;p&gt; );      &lt;/p&gt;
{ &quot;ok&quot; : 1, &quot;added&quot; : &quot;andro3:2048&quot; }
&lt;p&gt;&amp;gt; db.runCommand( &lt;/p&gt;
{ addshard : &quot;scorpius:2048&quot; }
&lt;p&gt; );&lt;/p&gt;
{ &quot;ok&quot; : 1, &quot;added&quot; : &quot;scorpius:2048&quot; }
&lt;p&gt;&amp;gt; admin = db.getSisterDB( &quot;test&quot; );                                   &lt;br/&gt;
test&lt;br/&gt;
&amp;gt; db.runCommand( &lt;/p&gt;
{ enablesharding : &quot;test&quot; }
&lt;p&gt; )&lt;/p&gt;
{ &quot;ok&quot; : 1 }
&lt;p&gt;&amp;gt; db&lt;br/&gt;
admin&lt;br/&gt;
&amp;gt; db.runCommand( { shardcollection : &quot;test.fs.chunks&quot;, key : &lt;/p&gt;
{ _id : 1 }
&lt;p&gt; } )&lt;/p&gt;
{ &quot;collectionsharded&quot; : &quot;test.fs.chunks&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;$./test_load_file.py Dexter.S04E03.HDTV.XviD-SYS.avi&lt;br/&gt;
=========================================================================================&lt;br/&gt;
On mongos console:&lt;br/&gt;
Wed Oct 21 15:03:43 ./mongos v0.3- (alpha 3) starting (--help for usage)&lt;br/&gt;
Wed Oct 21 15:03:43 git version: 2660c0ca229a557692780784a2b8b1a8ba7afd1f&lt;br/&gt;
Wed Oct 21 15:03:43 sys info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686&lt;br/&gt;
Wed Oct 21 15:03:43 connecting to griddb localhost:2049...Wed Oct 21 15:03:44 waiting for connections on port 27017&lt;br/&gt;
Wed Oct 21 15:16:00 connection accepted from 127.0.0.1:7813 #1&lt;br/&gt;
Wed Oct 21 15:16:29 couldn&apos;t find database &lt;span class=&quot;error&quot;&gt;&amp;#91;admin&amp;#93;&lt;/span&gt; in config db&lt;br/&gt;
Wed Oct 21 15:16:29 	 put &lt;span class=&quot;error&quot;&gt;&amp;#91;admin&amp;#93;&lt;/span&gt; on: localhost:2049&lt;br/&gt;
Wed Oct 21 15:17:57 couldn&apos;t find database &lt;span class=&quot;error&quot;&gt;&amp;#91;test&amp;#93;&lt;/span&gt; in config db&lt;br/&gt;
Wed Oct 21 15:17:57 	 put &lt;span class=&quot;error&quot;&gt;&amp;#91;test&amp;#93;&lt;/span&gt; on: scorpius:2048&lt;br/&gt;
Wed Oct 21 15:18:35 no chunks for:test.fs.chunks so creating first: shard  ns:test.fs.chunks shard: scorpius:2048 min: &lt;/p&gt;
{ _id: MinKey }
&lt;p&gt; max: &lt;/p&gt;
{ _id: MaxKey }
&lt;p&gt;before: &lt;/p&gt;
{ _id: ObjId(4adf0a2b581c741d1b0dcb4c) }
&lt;p&gt;	shard  ns:test.fs.chunks shard: scorpius:2048 min: &lt;/p&gt;
{ _id: MinKey }
&lt;p&gt; max: &lt;/p&gt;
{ _id: MaxKey }
&lt;p&gt;after : &lt;/p&gt;
{ _id: ObjId(4adf0a2b581c741d1b0dcb4c) }
&lt;p&gt;	shard  ns:test.fs.chunks shard: scorpius:2048 min: &lt;/p&gt;
{ _id: MinKey }
&lt;p&gt; max: &lt;/p&gt;
{ _id: MaxKey }
&lt;p&gt;Wed Oct 21 15:19:27 connection accepted from 127.0.0.1:43752 #2&lt;br/&gt;
Wed Oct 21 15:19:27 end connection 127.0.0.1:43752&lt;br/&gt;
Wed Oct 21 15:19:27 connection accepted from 127.0.0.1:44008 #3&lt;br/&gt;
Wed Oct 21 15:19:27 User Exception can&apos;t use unique indexes with sharding&lt;br/&gt;
Wed Oct 21 15:19:27 UserException: can&apos;t use unique indexes with sharding&lt;br/&gt;
creating WriteBackListener for: scorpius:2048&lt;br/&gt;
Wed Oct 21 15:19:27 UserException: can only delete with a non-shard key pattern if can delete as many as we find&lt;br/&gt;
Wed Oct 21 15:19:27 UserException: can&apos;t upsert something without shard key&lt;br/&gt;
Wed Oct 21 15:19:27 UserException: can&apos;t upsert something without shard key&lt;br/&gt;
=========================================================================================&lt;br/&gt;
$./mongo&lt;br/&gt;
&amp;gt; use test&lt;br/&gt;
switched to db test&lt;br/&gt;
&amp;gt; show collections                                                                                &lt;br/&gt;
fs.chunks&lt;br/&gt;
fs.files&lt;br/&gt;
system.indexes&lt;br/&gt;
&amp;gt; db.fs.files.find()&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4adf0a5f8f299e42c9000000&quot;), &quot;chunkSize&quot; : 256000, &quot;filename&quot; : &quot;Dexter.S04E03.HDTV.XviD-SYS.avi&quot;, &quot;length&quot; : 0, &quot;uploadDate&quot; : &quot;Wed Oct 21 2009 15:19:27 GMT+0200 (CEST)&quot;, &quot;next&quot; : null }
&lt;p&gt;&amp;gt; db.fs.chunks.find()&lt;br/&gt;
 =========================================================================================&lt;/p&gt;

&lt;p&gt;Replace  db.runCommand( { shardcollection : &quot;test.fs.chunks&quot;, key : &lt;/p&gt;
{ _id : 1 }
&lt;p&gt; } ) to db.runCommand( { shardcollection : &quot;test.fs.chunks&quot;, key : &lt;/p&gt;
{ n : 1 }
&lt;p&gt; } ) everything  going to work.&lt;/p&gt;
</description>
                <environment>On two servers Linux scorpius 2.6.28-15-server #52-Ubuntu SMP Wed Sep 9 11:50:50 UTC 2009 i686 GNU/Linux&lt;br/&gt;
mongodb-linux-i686-2009-10-16</environment>
        <key id="10784">SERVER-889</key>
            <summary>sharding by &quot;_id&quot; dosen&apos;t work for gridfs chunks</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="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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="iddqd">Tomasz Drobiszewski</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Oct 2009 09:28:01 +0000</created>
                <updated>Tue, 12 Jul 2016 00:27:33 +0000</updated>
                            <resolved>Thu, 29 Oct 2009 16:54:32 +0000</resolved>
                                                    <fixVersion>1.1.3</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="21466" author="eliot" created="Thu, 16 Dec 2010 15:09:47 +0000"  >&lt;p&gt;NOTE: currently it has to be sharded &lt;/p&gt;
{ files_id }</comment>
                            <comment id="11022" author="eliot" created="Thu, 29 Oct 2009 16:54:32 +0000"  >&lt;p&gt;fixed some of the underlying issues, but...&lt;/p&gt;

&lt;p&gt;the root problem is that there are operationson gridfs that don&apos;t many sense when you shard by _id&lt;/p&gt;

&lt;p&gt;chunks need to be sharded on &lt;/p&gt;
{ files_id , n }
&lt;p&gt; since that&apos;s what it looks up chunks by, not _id&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="10730">SERVER-888</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="10080" name="test_load_file.py" size="328" author="iddqd" created="Wed, 21 Oct 2009 09:28:01 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 29 Oct 2009 16:54:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 9 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-888'>SERVER-888</a></s>]]></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>
                            13 years, 9 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>iddqd</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpp8n:</customfieldvalue>

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

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

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