<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:44 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>[JAVA-203] get different throughput when using db.slaveOk() versus db.collection.addOption(Bytes.QUERYOPTION_SLAVEOK)</title>
                <link>https://jira.mongodb.org/browse/JAVA-203</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Problem:&lt;br/&gt;
Get the following results&lt;/p&gt;

&lt;p&gt;Case 1: db.slaveOk()&lt;br/&gt;
Queries : 120&lt;/p&gt;

&lt;p&gt;Case 2: db.collection.addOption(Bytes.QUERYOPTION_SLAVEOK)&lt;br/&gt;
Queries : 412095&lt;/p&gt;

&lt;p&gt;Workaround:&lt;br/&gt;
Don&apos;t use db.slaveOk()&lt;/p&gt;

&lt;p&gt;Reproduce:&lt;br/&gt;
See attached SlaveTest.java&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;compile with Java 2.2 Driver&lt;/li&gt;
	&lt;li&gt;Case 1 : java -cp mongo-2.2.jar:. com.test.SlaveTest &quot;10.202.215.63:27000,10.243.7.47&lt;br/&gt;
:27000&quot; test blogs 1 3&lt;/li&gt;
	&lt;li&gt;Case 2 : java -cp mongo-2.2.jar:. com.test.SlaveTest &quot;10.202.215.63:27000,10.243.7.47&lt;br/&gt;
:27000&quot; test blogs 2 3&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Business Case:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;performance&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>EC2 / Ubuntu 10.04&lt;br/&gt;
1.6.3&lt;br/&gt;
2.2 Java Driver</environment>
        <key id="13515">JAVA-203</key>
            <summary>get different throughput when using db.slaveOk() versus db.collection.addOption(Bytes.QUERYOPTION_SLAVEOK)</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="alvin">Alvin Richards</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Oct 2010 23:10:44 +0000</created>
                <updated>Fri, 29 Oct 2010 02:48:53 +0000</updated>
                            <resolved>Wed, 27 Oct 2010 21:31:13 +0000</resolved>
                                    <version>2.2</version>
                                    <fixVersion>2.3</fixVersion>
                                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="19732" author="eliot" created="Wed, 27 Oct 2010 21:31:13 +0000"  >&lt;p&gt;changed count() to make it more intuitive&lt;/p&gt;</comment>
                            <comment id="19731" author="auto" created="Wed, 27 Oct 2010 21:31:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: count follows collection options &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-203&quot; title=&quot;get different throughput when using db.slaveOk() versus db.collection.addOption(Bytes.QUERYOPTION_SLAVEOK)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-203&quot;&gt;&lt;del&gt;JAVA-203&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo-java-driver/commit/304b27451a3121a3f28f14817a6c69c824b920c8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo-java-driver/commit/304b27451a3121a3f28f14817a6c69c824b920c8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="19717" author="eliot" created="Wed, 27 Oct 2010 18:20:19 +0000"  >&lt;p&gt;No - i actually made sure to query things so the sub system was initialized&lt;/p&gt;</comment>
                            <comment id="19713" author="eliot" created="Wed, 27 Oct 2010 17:36:17 +0000"  >&lt;p&gt;with 5% for me after modifying test to initialize slave connections before starting timer&lt;/p&gt;</comment>
                            <comment id="19705" author="alvin" created="Wed, 27 Oct 2010 15:22:31 +0000"  >&lt;p&gt;Actually, looking at the results there is a 4x perf drop using db.slaveOk() versus collection.addOption(Bytes.QUERYOPTION_SLAVEOK).&lt;/p&gt;
</comment>
                            <comment id="19688" author="alvin" created="Wed, 27 Oct 2010 06:29:44 +0000"  >&lt;p&gt;Appears to be resolved with the master&lt;/p&gt;

&lt;p&gt;$ java -cp mongo.jar:./bin com.test.SlaveTest &quot;10.196.130.32:27000,10.203.61.5:27000&quot; test blogs 1 3 &lt;br/&gt;
Inserting data :&lt;br/&gt;
type:1&lt;br/&gt;
doCount:3&lt;br/&gt;
Querying data :&lt;br/&gt;
Queries : 104759&lt;br/&gt;
Rows found : 2095180&lt;br/&gt;
Finished :&lt;/p&gt;

&lt;p&gt;$ java -cp mongo.jar:./bin com.test.SlaveTest &quot;10.196.130.32:27000,10.203.61.5:27000&quot; test blogs 2 3 &lt;br/&gt;
Inserting data :&lt;br/&gt;
type:2&lt;br/&gt;
doCount:3&lt;br/&gt;
Querying data :&lt;br/&gt;
Queries : 396038&lt;br/&gt;
Rows found : 7920760&lt;br/&gt;
Finished :&lt;/p&gt;</comment>
                            <comment id="19681" author="eliot" created="Wed, 27 Oct 2010 04:22:14 +0000"  >&lt;p&gt;Did you try master?&lt;br/&gt;
This is likely the same issue as we saw/fixed before&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10554" name="SlaveTest.java" size="2672" author="alvin" created="Wed, 27 Oct 2010 20:53:27 +0000"/>
                            <attachment id="10550" name="SlaveTest.java" size="2604" author="alvin" created="Tue, 26 Oct 2010 23:15:44 +0000"/>
                    </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|hrhco7:</customfieldvalue>

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