<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:55:52 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-1925] Tailable cursor blocks on tryNext</title>
                <link>https://jira.mongodb.org/browse/JAVA-1925</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I can pretty reliably cause an oplog tailable cursor to block on tryNext by running a bunch of cursors in parallel. Sometimes my test program finishes successfully, other times it blocks on tryNext. The database is relatively small&lt;/p&gt;

&lt;p&gt;rslocal:PRIMARY&amp;gt; db.oplog.rs.stats()&lt;br/&gt;
{&lt;br/&gt;
        &quot;ns&quot; : &quot;local.oplog.rs&quot;,&lt;br/&gt;
        &quot;count&quot; : 1063,&lt;br/&gt;
        &quot;size&quot; : 1166114,&lt;br/&gt;
        &quot;avgObjSize&quot; : 1097,&lt;br/&gt;
        &quot;storageSize&quot; : 344064,&lt;br/&gt;
        &quot;capped&quot; : true,&lt;br/&gt;
        &quot;max&quot; : -1,&lt;br/&gt;
        &quot;maxSize&quot; : 1038090240,&lt;br/&gt;
        &quot;wiredTiger&quot;...&lt;/p&gt;

&lt;p&gt;I&apos;m running a 3.0.4 server standalone replica. &lt;/p&gt;

&lt;p&gt;I&apos;m able to demonstrate the exact same issue w/ 2.13.2 and 3.0.3 drivers:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/devinrsmith/mongocursorexample&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/devinrsmith/mongocursorexample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/devinrsmith/mongocursorexample/tree/v3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/devinrsmith/mongocursorexample/tree/v3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Am I using the api/cursors incorrectly? &lt;/p&gt;</description>
                <environment></environment>
        <key id="225809">JAVA-1925</key>
            <summary>Tailable cursor blocks on tryNext</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="-1">Unassigned</assignee>
                                    <reporter username="drsmith">Devin Smith</reporter>
                        <labels>
                            <label>Bug</label>
                            <label>driver</label>
                            <label>query</label>
                            <label>replicaset</label>
                    </labels>
                <created>Fri, 14 Aug 2015 21:27:11 +0000</created>
                <updated>Wed, 2 Dec 2015 11:37:01 +0000</updated>
                            <resolved>Thu, 8 Oct 2015 22:13:00 +0000</resolved>
                                    <version>2.13.2</version>
                    <version>3.0.3</version>
                                                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1103009" author="arcadius" created="Wed, 2 Dec 2015 11:37:01 +0000"  >&lt;p&gt;Thank you very much &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=drsmith&quot; class=&quot;user-hover&quot; rel=&quot;drsmith&quot;&gt;drsmith&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1100928" author="drsmith" created="Mon, 30 Nov 2015 17:49:27 +0000"  >&lt;p&gt;We are using docker mongo:3.0.6 in prod (NO vagrant) without issue so far.&lt;br/&gt;
The boxes are much beefier and in triplicate replication, probably with&lt;br/&gt;
some other configuration differences, so it&apos;s not an apples to apples&lt;br/&gt;
comparison.&lt;/p&gt;


&lt;p&gt;On Mon, Nov 30, 2015 at 11:40 AM Arcadius Ahouansou (JIRA) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="1100917" author="arcadius" created="Mon, 30 Nov 2015 17:40:55 +0000"  >&lt;p&gt;Hello again &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=drsmith&quot; class=&quot;user-hover&quot; rel=&quot;drsmith&quot;&gt;drsmith&lt;/a&gt;&lt;br/&gt;
We are seeing similar issue here.&lt;/p&gt;

&lt;p&gt;Please, are you using docker in Prod or just for Dev?&lt;br/&gt;
If yes, do you see that issue in Prod as well?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="1100748" author="drsmith" created="Mon, 30 Nov 2015 16:07:27 +0000"  >&lt;p&gt;Unfortunately not, but didn&apos;t dig into it too far. Running mongo locally&lt;br/&gt;
(OS X) as necessary for dev work that I need to do.&lt;/p&gt;

&lt;p&gt;On Mon, Nov 30, 2015 at 10:00 AM Arcadius Ahouansou (JIRA) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="1100736" author="arcadius" created="Mon, 30 Nov 2015 16:00:11 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=drsmith&quot; class=&quot;user-hover&quot; rel=&quot;drsmith&quot;&gt;drsmith&lt;/a&gt;&lt;br/&gt;
Please, apart from avoiding docker, have you found any other solution/workaround for this issue?&lt;br/&gt;
Thanks.&lt;/p&gt;</comment>
                            <comment id="1100515" author="drsmith" created="Mon, 30 Nov 2015 13:49:27 +0000"  >&lt;p&gt;Yes, I believe it was.&lt;/p&gt;

&lt;p&gt;On Mon, Nov 30, 2015, 7:23 AM Arcadius Ahouansou (JIRA) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="1100494" author="arcadius" created="Mon, 30 Nov 2015 13:23:25 +0000"  >&lt;p&gt;Hello  &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=drsmith&quot; class=&quot;user-hover&quot; rel=&quot;drsmith&quot;&gt;drsmith&lt;/a&gt;&lt;br/&gt;
In your last comment, you stated that the issue is only reproducible on Vagrant.&lt;br/&gt;
Is Vagrant running docker by any chance?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="1056039" author="jeff.yemin" created="Thu, 8 Oct 2015 22:13:01 +0000"  >&lt;p&gt;Thanks Devin,&lt;/p&gt;

&lt;p&gt;I&apos;m closing this issue now but please add further comments should you have more information at any time in the future, and I&apos;ll reopen it.&lt;/p&gt;</comment>
                            <comment id="1007250" author="drsmith" created="Mon, 17 Aug 2015 16:10:41 +0000"  >&lt;p&gt;So, my coworkers was able to reproduce this on one of his mongo instances, but not another. For local dev we use Vagrant (on OSX), and it seems the only times we can repro the issue is in Vagrant. I don&apos;t have the time to trace it any further than this at the moment... might try to get a minimally reproducible vagrant image sometime and pass it off to both teams for further investigation... for now though, we&apos;ll just be weary of mongo in Vagrant.&lt;/p&gt;</comment>
                            <comment id="1006345" author="drsmith" created="Fri, 14 Aug 2015 22:36:25 +0000"  >&lt;p&gt;It seems to me that I get mongo into a bad state by doing lots of cursors concurrently... then any manner of using cursors (serial or parallel) seems to fail. Maybe you can reproduce it by upping the number of concurrent cursors?&lt;/p&gt;

&lt;p&gt;I&apos;ve updated my code to count instead of storing the results, as well as loop through 100 times.&lt;/p&gt;

&lt;p&gt;I&apos;m also logging any MongoExceptions I receive, but specifically, that&apos;s not the case that I&apos;m worried about.&lt;/p&gt;</comment>
                            <comment id="1006336" author="drsmith" created="Fri, 14 Aug 2015 22:22:44 +0000"  >&lt;p&gt;mongod.conf shown in previous comment, default storage engine.&lt;/p&gt;</comment>
                            <comment id="1006334" author="jeff.yemin" created="Fri, 14 Aug 2015 22:20:26 +0000"  >&lt;p&gt;What&apos;s in mongod.conf?  Is this still with wired tiger?&lt;/p&gt;</comment>
                            <comment id="1006331" author="drsmith" created="Fri, 14 Aug 2015 22:16:55 +0000"  >&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;$ cat mongo/config/mongod.conf&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;replication:&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;  replSetName: rslocal&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;Brought up by docker-compose:&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;mongo:&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;  image: mongo:3.0.4&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;  volumes:&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;   - ./mongo/config:/config:ro&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;  ports:&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;27017:27017&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;   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;  command: --config /config/mongod.conf&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="1006328" author="jeff.yemin" created="Fri, 14 Aug 2015 22:14:27 +0000"  >&lt;p&gt;With what server configuration?&lt;/p&gt;</comment>
                            <comment id="1006304" author="drsmith" created="Fri, 14 Aug 2015 21:58:10 +0000"  >&lt;p&gt;I just modified my test, and I was able to hit the issue using only 1 cursor at a time:&lt;/p&gt;

&lt;p&gt;    public static void main( String[] args ) throws UnknownHostException, InterruptedException {&lt;br/&gt;
        final MongoClient client = new MongoClient(&quot;localhost&quot;, 27017);&lt;br/&gt;
        final DB db = client.getDB(&quot;local&quot;);&lt;br/&gt;
        if (!db.collectionExists(&quot;oplog.rs&quot;)) &lt;/p&gt;
{
            throw new IllegalStateException(&quot;No oplog.rs is present&quot;);
        }
&lt;p&gt;        final DBCollection oplog = db.getCollection(&quot;oplog.rs&quot;);&lt;br/&gt;
        for (int i = 0; i &amp;lt; 100; ++i) &lt;/p&gt;
{
            new MongoCursorExample(oplog, 1).run();
        }
&lt;p&gt;    }&lt;/p&gt;</comment>
                            <comment id="1006300" author="drsmith" created="Fri, 14 Aug 2015 21:56:47 +0000"  >&lt;p&gt;I&apos;ve got 3.0.4 running with the default storage engine. At first, things were looking really good. I did my test about 10 times, each with 10 cursors or so and things finished smoothly. Then it started blocking. Maybe there is some cursor buildup on the server that is causing issues?&lt;/p&gt;</comment>
                            <comment id="1006296" author="jeff.yemin" created="Fri, 14 Aug 2015 21:53:35 +0000"  >&lt;p&gt;I pegged 8 CPUs for a while, but even with 16 runners the program you supplied eventually completed against 3.0 with the default storage engine.  Curious to see your results as well.&lt;/p&gt;

&lt;p&gt;The only change I made: just to avoid garbage collection overhead, I changed your program to count the number of results rather than storing them in a list.  In my environment, there were about 314K oplog entries.&lt;/p&gt;</comment>
                            <comment id="1006279" author="drsmith" created="Fri, 14 Aug 2015 21:34:30 +0000"  >&lt;p&gt;I&apos;ll try to repro w/ 3.0 no wired tiger.&lt;/p&gt;</comment>
                            <comment id="1006277" author="jeff.yemin" created="Fri, 14 Aug 2015 21:30:57 +0000"  >&lt;p&gt;Hi Devin,&lt;/p&gt;

&lt;p&gt;Are you able to reproduce this with MongoDB 2.6 or MongoDB 3.0 with the default storage engine?&lt;/p&gt;</comment>
                            <comment id="1006276" author="drsmith" created="Fri, 14 Aug 2015 21:29:32 +0000"  >&lt;p&gt;I should also mention that the DB&apos;s data is static while I&apos;m running these tests.&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|hsck1z:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>