<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:32 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-2561] Allow for limited threadpool size in the Async driver</title>
                <link>https://jira.mongodb.org/browse/JAVA-2561</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Allow users to provide to limit the thread pool size or to supply an own &lt;tt&gt;ExecutorService&lt;/tt&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Was%3A&quot;&gt;&lt;/a&gt;Was:&lt;/h3&gt;

&lt;h4&gt;&lt;a name=&quot;UnlimitedthreadpoolgrowthusingAsynchronousSocketChannel&quot;&gt;&lt;/a&gt;Unlimited thread pool growth using AsynchronousSocketChannel&lt;/h4&gt;

&lt;p&gt;Mongo Driver async uses &lt;tt&gt;AsynchronousSocketChannel&lt;/tt&gt; without channel grouping that leads to the creation of an unbounded default thread pool. The pool grows with concurrent connection use, and it&apos;s not possible to limit the thread pool size or to supply an own &lt;tt&gt;ExecutorService&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This arrangement can allocate a lot of resources which is not desirable in the particular scenario of nonblocking usage. It&apos;s not possible to limit resources or a strategy for back-pressure caused by higher workload than available resources (reject, queue, allocate resources). Supplying an  &lt;tt&gt;ExecutorService&lt;/tt&gt; via &lt;tt&gt;AsynchronousSocketChannelStreamFactoryFactory&lt;/tt&gt; could help to address the issue.&lt;/p&gt;

&lt;p&gt;The issue originated in MongoDB RS driver usage, hence I&apos;m filing the ticket here and not in the JAVA (async) driver project.&lt;/p&gt;</description>
                <environment>Using MongoDB Reactive Streams driver 1.5</environment>
        <key id="406018">JAVA-2561</key>
            <summary>Allow for limited threadpool size in the Async driver</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="13201">Fixed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="mp911de">Mark Paluch</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jul 2017 15:36:42 +0000</created>
                <updated>Sun, 29 Oct 2023 02:32:39 +0000</updated>
                            <resolved>Fri, 8 Sep 2017 08:45:42 +0000</resolved>
                                                    <fixVersion>3.6.0</fixVersion>
                                    <component>Async</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="3218539" author="oleg.pudeyev" created="Mon, 22 Jun 2020 21:41:24 +0000"  >&lt;p&gt;Fix: &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/19336af05937e8a986cc583af6f86688bedf32a6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/19336af05937e8a986cc583af6f86688bedf32a6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1667768" author="flyaruu" created="Fri, 8 Sep 2017 10:08:18 +0000"  >&lt;p&gt;Seems to work great with the Reactive Streams driver. Thanks!&lt;/p&gt;</comment>
                            <comment id="1667732" author="ross@10gen.com" created="Fri, 8 Sep 2017 08:45:42 +0000"  >&lt;p&gt;This has now been merged to master and will be released in 3.6&lt;/p&gt;</comment>
                            <comment id="1666777" author="jeff.yemin" created="Thu, 7 Sep 2017 13:08:24 +0000"  >&lt;p&gt;You can test this branch: &lt;a href=&quot;https://github.com/rozza/mongo-java-driver/tree/j2561&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/rozza/mongo-java-driver/tree/j2561&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;Much obliged,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="1666767" author="flyaruu" created="Thu, 7 Sep 2017 12:56:54 +0000"  >&lt;p&gt;I see there is code in review, is there a branch I can test with or do I need to wait for the code review?&lt;/p&gt;</comment>
                            <comment id="1663714" author="ross@10gen.com" created="Mon, 4 Sep 2017 10:15:35 +0000"  >&lt;p&gt;Marking this for the 3.6 release. &lt;/p&gt;

&lt;p&gt;Note: once the work is committed into Master and passed the test suite it will automatically become available in the 3.6.0-SNAPSHOT build.&lt;/p&gt;</comment>
                            <comment id="1660773" author="flyaruu" created="Wed, 30 Aug 2017 16:16:11 +0000"  >&lt;p&gt;Hi, are there any updates here? I ported some of our code to use the reactive driver as the regular one didn&apos;t scale well with large datasets. However as it stands now my application just eats up all the connections it can get.&lt;/p&gt;

&lt;p&gt;Is there a nightly build I can use? Or some workaround to limit the number of connections?&lt;/p&gt;</comment>
                            <comment id="1626498" author="ross@10gen.com" created="Wed, 19 Jul 2017 16:42:48 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mp911de&quot; class=&quot;user-hover&quot; rel=&quot;mp911de&quot;&gt;mp911de&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for the ticket, as the fix is required in the Async driver I&apos;ve moved into the Java project. Ticket looks good, we will review and schedule in due course.&lt;/p&gt;

&lt;p&gt;Ross&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|ht2rx3:</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="1750">JVM Sprint 40</customfieldvalue>

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