<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:09 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>[CSHARP-546] not able to upload files to gridfs</title>
                <link>https://jira.mongodb.org/browse/CSHARP-546</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Receiving the below error while uploading files to GridFs using c# drivers (official), same code is working fine in our QA/Dev environments. &lt;/p&gt;

&lt;p&gt;Command &apos;filemd5&apos; failed: need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt; (response: { &quot;errmsg&quot; : &quot;need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt;&quot;, &quot;ok&quot; : 0.0 })&lt;/p&gt;</description>
                <environment>Stage</environment>
        <key id="47882">CSHARP-546</key>
            <summary>not able to upload files to gridfs</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="rsasapu">Ramesh S</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 21:14:00 +0000</created>
                <updated>Thu, 20 Mar 2014 16:39:27 +0000</updated>
                            <resolved>Fri, 24 Aug 2012 14:16:40 +0000</resolved>
                                    <version>1.5</version>
                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="156408" author="rstam" created="Fri, 24 Aug 2012 14:15:25 +0000"  >&lt;p&gt;Glad to hear that. Thanks for letting us know.&lt;/p&gt;</comment>
                            <comment id="156406" author="rsasapu" created="Fri, 24 Aug 2012 14:12:50 +0000"  >&lt;p&gt;thanks for your prompt reposne and all your help Rob &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
dropping and recreating indexes fixed the issue - now I can upload files to GridFS&lt;/p&gt;</comment>
                            <comment id="156299" author="rstam" created="Fri, 24 Aug 2012 00:20:43 +0000"  >&lt;p&gt;There might be entries in the log. Something like:&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;Thu Aug 23 20:18:42 [conn841] command csharpdriverunittests.$cmd command: { deleteIndexes: &quot;fs.chunks&quot;, index: &quot;*&quot; } ntoreturn:1 keyUpdates:0 locks(micros) w:12588166 reslen:106 12587ms&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;Thu Aug 23 20:19:05 [conn841] build index csharpdriverunittests.fs.chunks { files_id: 1.0, n: 1.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;Thu Aug 23 20:19:05 [conn841] build index done.  scanned 1 total records. 0.002 secs&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="156292" author="rsasapu" created="Thu, 23 Aug 2012 23:20:47 +0000"  >&lt;p&gt;thanks Rob&lt;br/&gt;
I will try these and let you the results.&lt;br/&gt;
Several people use this mongo instance. I am not sure who has changed this, I will try to reach out to everyone who is using this instance and try to find how it got changed.&lt;/p&gt;</comment>
                            <comment id="156290" author="rstam" created="Thu, 23 Aug 2012 23:04:01 +0000"  >&lt;p&gt;Actually, that index is all wrong (though we don&apos;t know why). Your key is:&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;&quot;key&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;{files_id:1, n:1}&quot; : 1,&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;{unique: true}&quot; : 1&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;the correct key is:&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;&quot;key&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;files_id&quot; : 1,&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;n&quot; : 1&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;You should drop that index and recreate it. You can do this in the shell:&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;&amp;gt; db.fs.chunks.dropIndexes()&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;&amp;gt; db.fs.chunks.ensureIndex({files_id:1,n:1},{unique:true})&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;&amp;gt; db.fs.chunks.getIndexes()&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;It would be nice to know how the index ended up being wrong. Do you have any insight into that?&lt;/p&gt;</comment>
                            <comment id="156289" author="rsasapu" created="Thu, 23 Aug 2012 23:02:52 +0000"  >&lt;p&gt;Thanks for the prompt reposne Rob,&lt;br/&gt;
I am not sure how the index name got changed - , you want me to try dropping the index and recreating? &lt;br/&gt;
If so pls let me know what commands do I need to run - &lt;/p&gt;</comment>
                            <comment id="156287" author="rstam" created="Thu, 23 Aug 2012 22:58:15 +0000"  >&lt;p&gt;Thanks for that last test. That&apos;s really helpful.&lt;/p&gt;

&lt;p&gt;Do you happen to know how the second index in fs.chunks got that unusual name? I&apos;m wondering if the name is throwing the server off. When I run getIndexes on my computer I have the same indexes but the name is different:&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;&amp;gt; db.fs.chunks.getIndexes()&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;[&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;        {&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;v&quot; : 1,&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;key&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;_id&quot; : 1&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;                },&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;ns&quot; : &quot;csharpdriverunittests.fs.chunks&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;name&quot; : &quot;_id_&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;        },&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;        {&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;v&quot; : 1,&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;key&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;files_id&quot; : 1,&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;n&quot; : 1&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;                },&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;unique&quot; : true,&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;ns&quot; : &quot;csharpdriverunittests.fs.chunks&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;name&quot; : &quot;files_id_1_n_1&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;        }&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;</comment>
                            <comment id="156273" author="rsasapu" created="Thu, 23 Aug 2012 22:07:08 +0000"  >&lt;p&gt;Below are the reults:&lt;br/&gt;
{ &quot;errmsg&quot; : &quot;need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt;&quot;, &quot;ok&quot; : 0 }&lt;/p&gt;

&lt;p&gt;And also I ran getIndexes() after that, and it returns indexes &lt;/p&gt;


&lt;p&gt;PRIMARY&amp;gt; use dpn&lt;br/&gt;
switched to db dpn&lt;br/&gt;
PRIMARY&amp;gt; var id=db.fs.files.findOne()._id&lt;br/&gt;
PRIMARY&amp;gt; db.runCommand(&lt;/p&gt;
{filemd5:id, root:&quot;fs&quot;}
&lt;p&gt;)&lt;br/&gt;
{ &quot;errmsg&quot; : &quot;need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt;&quot;, &quot;ok&quot; : 0 }&lt;br/&gt;
PRIMARY&amp;gt; var id = db.fs.files.findOne()._id&lt;br/&gt;
PRIMARY&amp;gt; db.runCommand(&lt;/p&gt;
{ filemd5 : id, root : &quot;fs&quot; }
&lt;p&gt;)&lt;br/&gt;
{ &quot;errmsg&quot; : &quot;need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt;&quot;, &quot;ok&quot; : 0 }&lt;br/&gt;
PRIMARY&amp;gt; db.fs.files.getIndexes()&lt;br/&gt;
[&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : &lt;/p&gt;
{
                        &quot;_id&quot; : 1
                }
&lt;p&gt;,&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.files&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;em&gt;id&lt;/em&gt;&quot;&lt;br/&gt;
        }&lt;br/&gt;
]&lt;br/&gt;
PRIMARY&amp;gt; db.fs.chunks.getIndexes()&lt;br/&gt;
[&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : &lt;/p&gt;
{
                        &quot;_id&quot; : 1
                }
&lt;p&gt;,&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.chunks&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;em&gt;id&lt;/em&gt;&quot;&lt;br/&gt;
        },&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : {&lt;br/&gt;
                        &quot;&lt;/p&gt;
{files_id:1, n:1}
&lt;p&gt;&quot; : 1,&lt;br/&gt;
                        &quot;&lt;/p&gt;
{unique: true}
&lt;p&gt;&quot; : 1&lt;br/&gt;
                },&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.chunks&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;/p&gt;
{files_id:1, n:1}
&lt;p&gt;&lt;em&gt;1&lt;/em&gt;&lt;/p&gt;
{unique: true}
&lt;p&gt;_1&quot;&lt;br/&gt;
        }&lt;br/&gt;
]&lt;/p&gt;</comment>
                            <comment id="156271" author="rstam" created="Thu, 23 Aug 2012 21:49:34 +0000"  >&lt;p&gt;I&apos;m going to find someone else to look at this with me... so far it seems like it should work.&lt;/p&gt;

&lt;p&gt;Here&apos;s another test you can try, which is to run an md5 command manually from the mongo shell:&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;&amp;gt; use dpn&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;&amp;gt; var id = db.fs.files.findOne()._id&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;&amp;gt; db.runCommand({ filemd5 : id, root : &quot;fs&quot; })&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;This runs an md5 command using an arbitrary files _id (the first one it finds). It does not alter any data on the server. You should get a reply that looks like this:&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;   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;{ &quot;numChunks&quot; : 1, &quot;md5&quot; : &quot;b10a8db164e0754105b7a99be72e3fe5&quot;, &quot;ok&quot; : 1 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="156265" author="rsasapu" created="Thu, 23 Aug 2012 21:33:17 +0000"  >&lt;p&gt;yes I did:&lt;br/&gt;
I ran it again, below are the results:&lt;/p&gt;

&lt;p&gt;C:\mongodb-win32-i386-2.0.5\bin&amp;gt;mongo ***.us.deloitte.com:27018&lt;br/&gt;
MongoDB shell version: 2.0.5&lt;br/&gt;
connecting to: ****:27018/test&lt;br/&gt;
PRIMARY&amp;gt; use dpn&lt;br/&gt;
switched to db dpn&lt;br/&gt;
PRIMARY&amp;gt; db.fs.files.count()&lt;br/&gt;
42854&lt;br/&gt;
PRIMARY&amp;gt; db.fs.chunks.getIndexes()&lt;br/&gt;
[&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : &lt;/p&gt;
{
                        &quot;_id&quot; : 1
                }
&lt;p&gt;,&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.chunks&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;em&gt;id&lt;/em&gt;&quot;&lt;br/&gt;
        },&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : {&lt;br/&gt;
                        &quot;&lt;/p&gt;
{files_id:1, n:1}
&lt;p&gt;&quot; : 1,&lt;br/&gt;
                        &quot;&lt;/p&gt;
{unique: true}
&lt;p&gt;&quot; : 1&lt;br/&gt;
                },&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.chunks&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;/p&gt;
{files_id:1, n:1}
&lt;p&gt;&lt;em&gt;1&lt;/em&gt;&lt;/p&gt;
{unique: true}
&lt;p&gt;_1&quot;&lt;br/&gt;
        }&lt;br/&gt;
]&lt;/p&gt;</comment>
                            <comment id="156257" author="rstam" created="Thu, 23 Aug 2012 21:24:02 +0000"  >&lt;p&gt;Just to make sure... in your earlier reply where you checked the indexes, you did do a &quot;use dpn&quot; first, right?&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;&amp;gt; use dpn&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;&amp;gt; db.fs.chunks.getIndexes()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="156251" author="rsasapu" created="Thu, 23 Aug 2012 21:14:37 +0000"  >&lt;p&gt;database.GridFS.Chunks.FullName : &quot;dpn.fs.chunks&quot;	&lt;/p&gt;

&lt;p&gt;I verified it agaian and I am sure that same server is being used: &lt;/p&gt;

&lt;p&gt;connectionString = &quot;mongodb://**&lt;b&gt;:27018,&lt;/b&gt;**&lt;b&gt;:27018,&lt;/b&gt;**&lt;b&gt;:27018,&lt;/b&gt;***:27018/dpn?replicaSet=rs1;safe=true&quot;&lt;/p&gt;</comment>
                            <comment id="156235" author="rstam" created="Thu, 23 Aug 2012 20:46:46 +0000"  >&lt;p&gt;No, if the indexes already exist there is no point in dropping them and recreating them.&lt;/p&gt;

&lt;p&gt;However, the server is saying that the index doesn&apos;t exist, so something is not right here...&lt;/p&gt;

&lt;p&gt;Can you set a breakpoint on line 122 of the PersistPhotos method of your BaseRepository class where you call MongoGridFS.Upload and exxamine the value of the following (where gridFS is whatever variable you are using to access GridFS):&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;   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;gridFS.Chunks.FullName&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;and verify that your program is actually using the same database and chunks collection that you examined in the mongo shell?&lt;/p&gt;</comment>
                            <comment id="156230" author="rsasapu" created="Thu, 23 Aug 2012 20:30:55 +0000"  >&lt;p&gt;I verified connection strings and they are same.&lt;br/&gt;
So I need to drop all indexes from fs.chunks and ensureIndex on &quot;_id&quot; field?&lt;/p&gt;</comment>
                            <comment id="156127" author="rstam" created="Thu, 23 Aug 2012 16:45:01 +0000"  >&lt;p&gt;The error message you are seeing is coming from the server, so there is nothing you can do at the client side (either in your application or the driver) other than to ensure that the required indexes exist.&lt;/p&gt;

&lt;p&gt;According to the mongo shell the indexes do exist... which is hard to explain. Is it possible that your application is pointed at one mongo server instance but your mongo shell is pointed at a different one? You could compare the connection string used by your application to the command line arguments you passed the mongo shell.&lt;/p&gt;

&lt;p&gt;Also, make sure you are using the right database before checking the indexes on fs.files and fs.chunks.&lt;/p&gt;

&lt;p&gt;There is no need to drop the collection(s). At the most you would need to call ensureIndex to recreate the indexes if you can figure out whether they are actually missing.&lt;/p&gt;
</comment>
                            <comment id="156117" author="rsasapu" created="Thu, 23 Aug 2012 16:23:15 +0000"  >&lt;p&gt;we can drop the file collection if thats going to help resolve the issue&lt;/p&gt;</comment>
                            <comment id="156100" author="rsasapu" created="Thu, 23 Aug 2012 15:54:26 +0000"  >&lt;p&gt;Thanks Rob,&lt;br/&gt;
Indexes are there in the collection - I am not sure if any indexes were dropped/recreated.&lt;br/&gt;
Is there anyway to address this issue ? We need to upload pictures to our production environment today.&lt;/p&gt;

&lt;p&gt;Error details and stats are below:&lt;/p&gt;

&lt;p&gt;PRIMARY&amp;gt; db.fs.files.count()&lt;br/&gt;
42854&lt;br/&gt;
PRIMARY&amp;gt; db.fs.chunks.getIndexes()&lt;br/&gt;
[&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : &lt;/p&gt;
{
                        &quot;_id&quot; : 1
                }
&lt;p&gt;,&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.chunks&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;em&gt;id&lt;/em&gt;&quot;&lt;br/&gt;
        },&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : {&lt;br/&gt;
                        &quot;&lt;/p&gt;
{files_id:1, n:1}
&lt;p&gt;&quot; : 1,&lt;br/&gt;
                        &quot;&lt;/p&gt;
{unique: true}
&lt;p&gt;&quot; : 1&lt;br/&gt;
                },&lt;br/&gt;
                &quot;ns&quot; : &quot;dpn.fs.chunks&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;/p&gt;
{files_id:1, n:1}
&lt;p&gt;&lt;em&gt;1&lt;/em&gt;&lt;/p&gt;
{unique: true}
&lt;p&gt;_1&quot;&lt;br/&gt;
        }&lt;br/&gt;
]&lt;/p&gt;

&lt;p&gt;Error:&lt;br/&gt;
Command &apos;filemd5&apos; failed: need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt; (response: { &quot;errmsg&quot; : &quot;need an index on &lt;/p&gt;
{ files_id : 1 , n : 1 }
&lt;p&gt;&quot;, &quot;ok&quot; : 0.0 })&lt;/p&gt;

&lt;p&gt;Stack trace:&lt;/p&gt;

&lt;p&gt;   at MongoDB.Driver.MongoDatabase.RunCommandAs(Type commandResultType, IMongoCommand command)&lt;br/&gt;
   at MongoDB.Driver.MongoDatabase.RunCommandAs&lt;span class=&quot;error&quot;&gt;&amp;#91;TCommandResult&amp;#93;&lt;/span&gt;(IMongoCommand command)&lt;br/&gt;
   at MongoDB.Driver.MongoDatabase.RunCommand(IMongoCommand command)&lt;br/&gt;
   at MongoDB.Driver.GridFS.MongoGridFS.Upload(Stream stream, String remoteFileName, MongoGridFSCreateOptions createOptions)&lt;br/&gt;
   at MongoDB.Driver.GridFS.MongoGridFS.Upload(Stream stream, String remoteFileName)&lt;br/&gt;
   at Deloitte.Mobile.PeopleNetwork.DataManagement.Data.Repositories.BaseRepository.PersistPhotos() in C:\DeloitteVSProjects\SPNServices\trunk\Deloitte.Mobile.PeopleNetwork.DataManagement.Data\Repositories\BaseRepository.cs:line 122&lt;br/&gt;
   at Deloitte.Mobile.PeopleNetwork.DataManagement.Importer.MongoImporter.ImportPhotos() in C:\DeloitteVSProjects\SPNServices\trunk\Deloitte.Mobile.PeopleNetwork.DataManagement\Importer\MongoImporter.cs:line 151&lt;br/&gt;
   at Deloitte.Mobile.PeopleNetwork.DataManagement.Importer.MongoImporter.Import() in C:\DeloitteVSProjects\SPNServices\trunk\Deloitte.Mobile.PeopleNetwork.DataManagement\Importer\MongoImporter.cs:line 137&lt;br/&gt;
   at Deloitte.Mobile.PeopleNetwork.DataManagement.ConsoleApp.Program.Main(String[] args) in C:\DeloitteVSProjects\SPNServices\trunk\Deloitte.Mobile.PeopleNetwork.DataManagement.ConsoleApp\Program.cs:line 14&lt;br/&gt;
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)&lt;br/&gt;
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&lt;br/&gt;
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;br/&gt;
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;br/&gt;
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)&lt;br/&gt;
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;br/&gt;
   at System.Threading.ThreadHelper.ThreadStart()&lt;/p&gt;

</comment>
                            <comment id="155978" author="rstam" created="Thu, 23 Aug 2012 04:20:20 +0000"  >&lt;p&gt;Can you please provide a stack trace?&lt;/p&gt;

&lt;p&gt;The error message is indicating that an index is missing. Usually the index is created automatically, but all drivers only create the indexes automatically if the fs.files collection contains less than 1000 files. Any chance you deleted any indexes yourself?&lt;/p&gt;

&lt;p&gt;You can check how many files you already have using the mongo shell:&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;&amp;gt; use &amp;lt;insert your database name here&amp;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;   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;&amp;gt; db.fs.files.count()&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;You can see which indexes the fs.chunks collection (the one that is missing the index) has using:&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;   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;&amp;gt; db.fs.chunks.getIndexes()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh77z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13969</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>