<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:51 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-118] DropCollection fails with &quot;not master&quot; when SlaveOK is specified in connection string</title>
                <link>https://jira.mongodb.org/browse/CSHARP-118</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When SlaveOk is specified in the connection string, the DropCollection command fails as the driver uses the generic FindOneAs() function to send the command to mongodb. FindOneAs() will pick a slave as it thinks it is a read operation and SlaveOk has been set. &lt;/p&gt;

&lt;p&gt;Steps to reproduce:&lt;/p&gt;

&lt;p&gt;1) Create a mongodb replica set with at least one master and one slave&lt;/p&gt;

&lt;p&gt;2) Use a connection string that specifies SlaveOk&lt;/p&gt;

&lt;p&gt;3) Execute DropCollection on a database&lt;/p&gt;

&lt;p&gt;4) &quot;Not master&quot; exception is thrown &lt;/p&gt;

&lt;p&gt;Callstack (line numbers may be incorrect):&lt;br/&gt;
&amp;gt;	MongoDB.Driver.dll!MongoDB.Driver.MongoDatabase.RunCommandAs&amp;lt;MongoDB.Bson.BsonDocument,MongoDB.Driver.CommandResult&amp;gt;(MongoDB.Bson.BsonDocument command) Line 343	C#&lt;br/&gt;
 	MongoDB.Driver.dll!MongoDB.Driver.MongoDatabase.RunCommand&amp;lt;MongoDB.Bson.BsonDocument&amp;gt;(MongoDB.Bson.BsonDocument command) Line 319 + 0x30 bytes	C#&lt;br/&gt;
 	MongoDB.Driver.dll!MongoDB.Driver.MongoDatabase.DropCollection(string collectionName) Line 178 + 0x10 bytes	C#&lt;/p&gt;

&lt;p&gt;Root cause:&lt;br/&gt;
var result = CommandCollection.FindOneAs&amp;lt;TCommand, TCommandResult&amp;gt;(command); // this will cause a slave to be chosen as the connection&lt;/p&gt;
</description>
                <environment>N/A</environment>
        <key id="13828">CSHARP-118</key>
            <summary>DropCollection fails with &quot;not master&quot; when SlaveOK is specified in connection string</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="derfel">J W Lee</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 Dec 2010 00:53:48 +0000</created>
                <updated>Thu, 2 Apr 2015 18:28:34 +0000</updated>
                            <resolved>Wed, 1 Dec 2010 03:36:17 +0000</resolved>
                                    <version>0.7</version>
                                    <fixVersion>0.9</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="20867" author="rstam" created="Wed, 1 Dec 2010 03:36:17 +0000"  >&lt;p&gt;Fixed. For now all commands will be routed to the primary (in the future we might figure out which commands must be routed to the primary and which are OK to route to the secondaries).&lt;/p&gt;</comment>
                            <comment id="20865" author="rstam" created="Wed, 1 Dec 2010 03:05:46 +0000"  >&lt;p&gt;You are right. Even though commands are technically queries many of them involve writes and should be routed to the primary.&lt;/p&gt;</comment>
                    </comments>
                    <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|hrh9l3:</customfieldvalue>

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