<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:07:14 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-4874] unrecognized command: setShardVersion</title>
                <link>https://jira.mongodb.org/browse/SERVER-4874</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I just set up a brand new shard cluster and received the following error when trying to create an index on a non-sharded collection. I tried the command multiple times and got the same error, but after I restart the mongo client the command worked.&lt;/p&gt;

&lt;p&gt;ubuntu@mongo1:~/mongodb-linux-x86_64-2.0.2$ bin/mongo&lt;br/&gt;
MongoDB shell version: 2.0.2&lt;br/&gt;
connecting to: test&lt;br/&gt;
mongos&amp;gt; use pb2&lt;br/&gt;
switched to db pb2&lt;br/&gt;
mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{addShard:&quot;mongo1.foobar.com&quot;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;can&apos;t add a mongos process as a shard&quot; }
&lt;p&gt;mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{addShard:&quot;mongo1.foobar.com:27018&quot;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;shardAdded&quot; : &quot;shard0000&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{addShard:&quot;mongo2.foobar.com:27018&quot;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;shardAdded&quot; : &quot;shard0001&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{addShard:&quot;mongo3.foobar.com:27018&quot;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;shardAdded&quot; : &quot;shard0002&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{enablesharding:&apos;pb2&apos;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{shardcollection:&quot;pb2.hourly_stats&quot;}
&lt;p&gt;)&lt;/p&gt;
{ &quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;no shard key&quot; }
&lt;p&gt;mongos&amp;gt; db.adminCommand({shardcollection:&quot;pb2.hourly_stats&quot;, key:{_id:1}})&lt;/p&gt;
{ &quot;collectionsharded&quot; : &quot;pb2.hourly_stats&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; db.adminCommand({shardcollection:&quot;pb2.aggregated_stats&quot;, key:{_id:1}})&lt;/p&gt;
{ &quot;collectionsharded&quot; : &quot;pb2.aggregated_stats&quot;, &quot;ok&quot; : 1 }
&lt;p&gt;mongos&amp;gt; show collections&lt;br/&gt;
aggregated_stats&lt;br/&gt;
hourly_stats&lt;br/&gt;
log_files&lt;br/&gt;
system.indexes&lt;br/&gt;
&amp;lt;At this point I run a script which inserts a bunch of objects into the log_files collection, implicitly creating it&amp;gt;&lt;br/&gt;
mongos&amp;gt; db.log_files.ensureIndex(&lt;/p&gt;
{status:1}
&lt;p&gt;)&lt;br/&gt;
Sat Feb  4 06:07:08 uncaught exception: getlasterror failed: {&lt;br/&gt;
        &quot;assertion&quot; : &quot;nextSafe(): &lt;/p&gt;
{ $err: \&quot;unrecognized command: setShardVersion\&quot;, code: 13390 }
&lt;p&gt;&quot;,&lt;br/&gt;
        &quot;assertionCode&quot; : 13106,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;db assertion failure&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>Ubunutu 11.10 and 11.4, mongodb version 2.0.2 (all of mongod, mongos, and mongo client). Sharded 3 nodes, no replica sets, 3 config servers</environment>
        <key id="29886">SERVER-4874</key>
            <summary>unrecognized command: setShardVersion</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="randolph@mongodb.com">Randolph Tan</assignee>
                                    <reporter username="zacwitte">Zac Witte</reporter>
                        <labels>
                    </labels>
                <created>Sat, 4 Feb 2012 06:22:07 +0000</created>
                <updated>Wed, 15 Aug 2012 14:04:14 +0000</updated>
                            <resolved>Fri, 25 May 2012 15:04:01 +0000</resolved>
                                    <version>2.0.2</version>
                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="123118" author="renctan" created="Fri, 25 May 2012 15:10:02 +0000"  >&lt;p&gt;The setShardVersion command is triggered when the getLastError command was called. And since the ScopedDBConnection was used to the mongos host when processing addShard, the callback for onCreate gets triggered, which results in the mongos host being added to the getLastError host. This is already fixed in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5243&quot; title=&quot;mongos will route getLastError command to the config server when last insert triggered a split&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5243&quot;&gt;&lt;del&gt;SERVER-5243&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As for the segfault, it was caused by an error in the test script, calling &lt;/p&gt;
{ shardCollection: &apos;test&apos;, ... }
&lt;p&gt; instead of &lt;/p&gt;
{ shardCollection: &apos;test.user&apos;, ... }
&lt;p&gt;. A separate ticket (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5926&quot; title=&quot;Segfault when procesing a command with empty namespace&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5926&quot;&gt;&lt;del&gt;SERVER-5926&lt;/del&gt;&lt;/a&gt;) has been created to handle this issue.&lt;/p&gt;</comment>
                            <comment id="122949" author="renctan" created="Thu, 24 May 2012 23:04:22 +0000"  >&lt;p&gt;Confirmed to be reproducible. The setShardVersion failure happens when trying to register a writebackListener on the other mongos shard (that was passed to the failed addShard command). Needs to investigate further. In 2.1.2, the mongod shard would get a segmentation fault every time even before the procedure is completed.&lt;/p&gt;</comment>
                            <comment id="85270" author="eliot" created="Sat, 4 Feb 2012 14:25:04 +0000"  >&lt;p&gt;The initial addShard with a mongos is probably being cached somewhere.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="32467">SERVER-5243</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 4 Feb 2012 14:25:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 38 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_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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 38 weeks, 5 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
            <customfieldvalue>zacwitte</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroegv:</customfieldvalue>

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

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

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