<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:53 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-1866] GridFS should check whether indexes already exist before trying to create them</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1866</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;In our application we have some security restrictions for user which uses GridFS. &lt;br/&gt;
User granted actions are: &quot;insert&quot;, &quot;remove&quot;, &quot;update&quot;, &quot;find&quot;. &lt;br/&gt;
We don&apos;t want to grant database management actions, such as &quot;createIndex&quot;, to application user.&lt;br/&gt;
In our situation OpenUploadStream method in GridFSBucket class try to create index for GridFS collection (because collection is empty) and fails with MongoCommandException &quot;not authorized on DBNAME to execute command { createIndexes: &quot;COLLECTIONNAME.files&quot;...&quot;. &lt;br/&gt;
I can send pull request with checking if index already exists to avoid index creation. &lt;br/&gt;
But it is fundamentally wrong to do DBA&apos;s work from driver. &lt;br/&gt;
DBA should create all necessary indexes from deployment script.&lt;/p&gt;</description>
                <environment>.NET</environment>
        <key id="338399">CSHARP-1866</key>
            <summary>GridFS should check whether indexes already exist before trying to create them</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="tomak_k.s.">Tomak Ksenia</reporter>
                        <labels>
                            <label>GridFS</label>
                            <label>Permissions</label>
                    </labels>
                <created>Tue, 13 Dec 2016 11:35:32 +0000</created>
                <updated>Sat, 22 Apr 2017 16:01:34 +0000</updated>
                            <resolved>Tue, 27 Dec 2016 22:19:36 +0000</resolved>
                                    <version>2.1</version>
                                    <fixVersion>2.4.1</fixVersion>
                                    <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1465652" author="xgen-internal-githook" created="Tue, 27 Dec 2016 22:18:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;rstam&apos;, u&apos;email&apos;: u&apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1866&quot; title=&quot;GridFS should check whether indexes already exist before trying to create them&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1866&quot;&gt;&lt;del&gt;CSHARP-1866&lt;/del&gt;&lt;/a&gt;: GridFS should check whether the indexes already exist before trying to create them.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/54b263d86da003266adf45496d4192ac1d37f593&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/54b263d86da003266adf45496d4192ac1d37f593&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1464158" author="rstam" created="Thu, 22 Dec 2016 17:14:01 +0000"  >&lt;p&gt;I agree with you that applications normally shouldn&apos;t do DBA like functions automatically.&lt;/p&gt;

&lt;p&gt;However, in the case of GridFS the decision was made that most users would treat GridFS like a black box and wouldn&apos;t even know that certain indexes need to be created to support GridFS, so drivers create these indexes automatically.&lt;/p&gt;

&lt;p&gt;The GridFS spec says that drivers should only create the indexes if the collection is empty and the index does not already exist.&lt;/p&gt;

&lt;p&gt;The .NET driver has a bug in that it is only checking whether the collection is empty It should also check whether the index already exists.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="322290">CSHARP-1788</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrev33:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1431">C# Sprint 46</customfieldvalue>

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