<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:10: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-6069] maxChunksize error when using &apos;find&apos; instead of &apos;middle&apos; with the &apos;split&apos; command.</title>
                <link>https://jira.mongodb.org/browse/SERVER-6069</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Issue is while trying to pre-split a chunk on a sharded collection using the &apos;find&apos;, &apos;to&apos; split options. Using the &apos;middle&apos; option works as shown below:&lt;/p&gt;

&lt;p&gt;MongoDB shell version: 2.0.6&lt;br/&gt;
connecting to: test&lt;br/&gt;
mongos&amp;gt; db.createCollection(&apos;test&apos;);&lt;/p&gt;
{ &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; use admin&lt;br/&gt;
switched to db admin&lt;br/&gt;
mongos&amp;gt; db.runCommand(&lt;/p&gt;
{enablesharding: &apos;test&apos;}
&lt;p&gt;);&lt;/p&gt;
{ &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.runCommand({&apos;shardcollection&apos;: &apos;test.test&apos;, key: {&apos;key1&apos;: 1, &apos;key2&apos;: 1}});&lt;/p&gt;
{ &quot;collectionsharded&quot; : &quot;test.test&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.runCommand({split: &apos;test.test&apos;, find: &lt;/p&gt;
{ &apos;key1&apos;: 1, &apos;key2&apos;: 1 }
&lt;p&gt;, to: { &apos;key1&apos;: 6, &apos;key2&apos;: 6 }});&lt;br/&gt;
{&lt;br/&gt;
        &quot;assertion&quot; : &quot;splitVector command (median key) failed: &lt;/p&gt;
{ errmsg: \&quot;need to specify the desired max chunk size (maxChunkSize or maxChunkSizeBytes)\&quot;, ok: 0.0 }
&lt;p&gt;&quot;,&lt;br/&gt;
        &quot;assertionCode&quot; : 13503,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;db assertion failure&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;br/&gt;
mongos&amp;gt; db.runCommand({split: &apos;test.test&apos;, find: &lt;/p&gt;
{ &apos;key1&apos;: 1, &apos;key2&apos;: 1 }
&lt;p&gt;, to: &lt;/p&gt;
{ &apos;key1&apos;: 5, &apos;key2&apos;: 5 }
&lt;p&gt;, maxChunkSize: 16});&lt;br/&gt;
{&lt;br/&gt;
        &quot;assertion&quot; : &quot;splitVector command (median key) failed: &lt;/p&gt;
{ errmsg: \&quot;need to specify the desired max chunk size (maxChunkSize or maxChunkSizeBytes)\&quot;, ok: 0.0 }
&lt;p&gt;&quot;,&lt;br/&gt;
        &quot;assertionCode&quot; : 13503,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;db assertion failure&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;br/&gt;
mongos&amp;gt; db.runCommand({split: &apos;test.test&apos;, middle: { &apos;key1&apos;: 3, &apos;key2&apos;: 3 }});&lt;/p&gt;
{ &quot;ok&quot; : 1 }


&lt;p&gt;I&apos;ve also tried increasing and decreasing the chunk size from the config db with no changes to the above error message.&lt;/p&gt;</description>
                <environment>Linux (virtual)  #28-Ubuntu SMP Fri Jan 27 18:22:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux&lt;br/&gt;
&lt;br/&gt;
Description:    Ubuntu 11.10&lt;br/&gt;
Release:        11.10&lt;br/&gt;
Codename:       oneiric&lt;br/&gt;
&lt;br/&gt;
Total of four ec2 instances with the following configuration:&lt;br/&gt;
server 1 running mongos&lt;br/&gt;
server 2 running mongod, config server (shard1)&lt;br/&gt;
server 3 running mongod, config server (shard2)&lt;br/&gt;
server 4 running mongod, config server (shard3)&lt;br/&gt;
&lt;br/&gt;
Using the mongodb-10gen repo from apt-get.&lt;br/&gt;
</environment>
        <key id="40992">SERVER-6069</key>
            <summary>maxChunksize error when using &apos;find&apos; instead of &apos;middle&apos; with the &apos;split&apos; command.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="greg_10gen">Greg Studer</assignee>
                                    <reporter username="noid">q</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jun 2012 18:03:23 +0000</created>
                <updated>Mon, 11 Jul 2016 18:33:34 +0000</updated>
                            <resolved>Thu, 6 Mar 2014 22:50:10 +0000</resolved>
                                    <version>2.0.4</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="172949" author="jenna" created="Tue, 9 Oct 2012 16:37:07 +0000"  >&lt;p&gt;Using 2.2.0&lt;/p&gt;

&lt;p&gt;db.runCommand( { split : &quot;oct9.oct9&quot; , find : &lt;/p&gt;
{ name: &quot;Isaac&quot; }
&lt;p&gt; } )&lt;/p&gt;

&lt;p&gt;fails if oct9 is an empty collection. Error message: &lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &quot;errmsg&quot; : &quot;exception: splitVector command (median key) failed: { errmsg: \&quot;need to specify the desired max chunk size (maxChunkSize or maxChunkSizeBytes)\&quot;, ok: 0.0 }&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	&quot;code&quot; : 13503,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	&quot;ok&quot; : 0&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;using &quot;middle&quot; instead of &quot;find&quot; works. &lt;/p&gt;</comment>
                            <comment id="132118" author="noid" created="Wed, 13 Jun 2012 21:07:03 +0000"  >&lt;p&gt;My misunderstanding. Thanks for the explanation.&lt;/p&gt;</comment>
                            <comment id="131289" author="greg_10gen" created="Tue, 12 Jun 2012 21:02:52 +0000"  >&lt;p&gt;The error message is wrong - but think this is undefined behavior - &quot;to&quot; is not a documented option in the split command.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.mongodb.org/display/DOCS/Splitting+Shard+Chunks&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Splitting+Shard+Chunks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There&apos;s no need to specify a &quot;to&quot; field because a split always breaks an existing chunk into two parts, by splitting at one point.  The initial chunk is $MinKey-&amp;gt;$MaxKey.&lt;/p&gt;

&lt;p&gt;Think the desired behavior here is just :&lt;/p&gt;

&lt;p&gt;db.runCommand({split: &apos;test.test&apos;, middle: &lt;/p&gt;
{ &apos;key1&apos;: 1, &apos;key2&apos;: 1 }
&lt;p&gt; })&lt;br/&gt;
db.runCommand({split: &apos;test.test&apos;, middle: &lt;/p&gt;
{ &apos;key6&apos;: 1, &apos;key2&apos;: 6 }
&lt;p&gt; })&lt;/p&gt;</comment>
                            <comment id="130805" author="eliot" created="Tue, 12 Jun 2012 06:27:27 +0000"  >&lt;p&gt;Was there any data in the collection?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 12 Jun 2012 06:27:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 19 weeks, 1 day 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>
                            11 years, 19 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10021"><![CDATA[OS X]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>jenna</customfieldvalue>
            <customfieldvalue>noid</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro0b3:</customfieldvalue>

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

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

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