<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:58 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-158] &quot;Get more&quot; cursor operation broken when talking to mongos with slaveOk=true</title>
                <link>https://jira.mongodb.org/browse/CSHARP-158</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;celestine-3 is an instance of mongos (nightly 27 Jan 2011) with one shard, referring to a replica set with 3 machines.&lt;br/&gt;
The replica set has database &quot;test1&quot; which contains &quot;items&quot; collection with 320000 documents.&lt;br/&gt;
Connecting to mongos with slaveOk=false or a a replica set underlying the mongos instance works fine even with slaveOk=true works fine.&lt;/p&gt;

&lt;p&gt;The following code reads some records, then bails out with an exception (see below):&lt;br/&gt;
        static void ReadTest()&lt;br/&gt;
        {&lt;br/&gt;
            try&lt;/p&gt;
            {
                const string connectionString = &quot;mongodb://celestine-3/test1?slaveOk=true&quot;;
                var database = MongoDatabase.Create(MongoUrl.Create(connectionString));
                var items = database[&quot;items&quot;];
                var cursor = items.FindAll();
                long sum = 0;
                foreach (var item in cursor)
                    sum += item[&quot;v&quot;].ToInt64();
            }
&lt;p&gt;            catch (Exception ex)&lt;/p&gt;
            {
                Console.WriteLine(ex.ToString());
            }
&lt;p&gt;            Console.ReadKey();&lt;br/&gt;
        }&lt;/p&gt;

&lt;p&gt;Exception:&lt;br/&gt;
MongoDB.Driver.MongoQueryException: Cursor not found.&lt;br/&gt;
   at MongoDB.Driver.Internal.MongoReplyMessage`1.ReadFrom(BsonBuffer buffer) in Driver\Internal\MongoReplyMessage.cs&lt;br/&gt;
   at MongoDB.Driver.Internal.MongoConnection.ReceiveMessage&lt;span class=&quot;error&quot;&gt;&amp;#91;TDocument&amp;#93;&lt;/span&gt;(MongoServer server) in Driver\Internal\MongoConnection.cs&lt;br/&gt;
   at MongoDB.Driver.Internal.MongoCursorEnumerator`1.GetReply(MongoRequestMessage message) in Driver\Internal\MongoCursorEnumerator.cs&lt;br/&gt;
   at MongoDB.Driver.Internal.MongoCursorEnumerator`1.GetMore() in Driver\Internal\MongoCursorEnumerator.cs&lt;br/&gt;
   at MongoDB.Driver.Internal.MongoCursorEnumerator`1.MoveNext() in Driver\Internal\MongoCursorEnumerator.cs&lt;br/&gt;
   at mongotest.Program.ReadTest() in Program.cs:line 115&lt;/p&gt;</description>
                <environment></environment>
        <key id="14324">CSHARP-158</key>
            <summary>&quot;Get more&quot; cursor operation broken when talking to mongos with slaveOk=true</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="5">Cannot Reproduce</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="onyxmaster">Aristarkh Zagorodnikov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Jan 2011 08:56:41 +0000</created>
                <updated>Thu, 20 Mar 2014 14:30:48 +0000</updated>
                            <resolved>Wed, 16 Feb 2011 14:17:42 +0000</resolved>
                                    <version>0.11</version>
                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="24014" author="rstam" created="Wed, 16 Feb 2011 14:17:42 +0000"  >&lt;p&gt;Thanks for the update.&lt;/p&gt;</comment>
                            <comment id="24013" author="onyxmaster" created="Wed, 16 Feb 2011 14:03:40 +0000"  >&lt;p&gt;Can&apos;t repro anymore after upgrading to newer mongos, might be some of the recent (or not-so-recent fixes). I think this can be closed now, thanks.&lt;/p&gt;</comment>
                            <comment id="22735" author="onyxmaster" created="Thu, 27 Jan 2011 08:59:17 +0000"  >&lt;p&gt;I&apos;m not sure if it&apos;s actually a driver issue, check &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-2411&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-2411&lt;/a&gt; (it&apos;s marked as resolved/fixed, but when using the latest master build the problem still persists).&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|hrh9d3:</customfieldvalue>

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