<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:34 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>[GODRIVER-2423] WaitQueueTimeoutError reports pinned connections when no pinning occurs</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2423</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;&lt;b&gt;Scope&lt;/b&gt;&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Do not include the &quot;connections in use by cursors: x, connections in use by transactions: y, connections in use by other operations: z&quot; part of the &lt;tt&gt;WaitQueueTimeoutError&lt;/tt&gt; when connections are not being pinned.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;Background &amp;amp; Motivation&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;When connected to a Load Balancers, drivers are required to pin connections to cursors and transactions.&lt;br/&gt;
Drivers are &lt;a href=&quot;https://github.com/mongodb/specifications/blob/d1458823bd810014df9da16d3a5354d2269ab865/source/load-balancers/load-balancers.rst#connection-tracking&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;required to report the pinned connections in the WaitQueueTimeoutError&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Go driver always reports pinned connections in &lt;tt&gt;WaitQueueTimeoutError&lt;/tt&gt;, even if no connection pinning occurs.&lt;/p&gt;

&lt;p&gt;That can cause confusing error messages when not connected to a load balanced cluster. Example:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;timed out while checking out a connection from connection pool: context canceled; maxPoolSize: 300, connections in use by cursors: 0, connections in use by transactions: 0, connections in use by other operations: 0&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="2047734">GODRIVER-2423</key>
            <summary>WaitQueueTimeoutError reports pinned connections when no pinning occurs</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="qingyang.hu@mongodb.com">Qingyang Hu</assignee>
                                    <reporter username="kevin.albertson@mongodb.com">Kevin Albertson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 May 2022 18:35:18 +0000</created>
                <updated>Wed, 8 Nov 2023 03:32:06 +0000</updated>
                            <resolved>Tue, 29 Aug 2023 22:08:37 +0000</resolved>
                                                    <fixVersion>1.12.2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5863066" author="xgen-internal-githook" created="Wed, 8 Nov 2023 03:32:06 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Qingyang Hu&apos;, &apos;email&apos;: &apos;103950869+qingyang-hu@users.noreply.github.com&apos;, &apos;username&apos;: &apos;qingyang-hu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2423&quot; title=&quot;WaitQueueTimeoutError reports pinned connections when no pinning occurs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2423&quot;&gt;&lt;del&gt;GODRIVER-2423&lt;/del&gt;&lt;/a&gt; Include pinned connections in WaitQueueTimeoutError only for load balanced clusters. (#1353)&lt;br/&gt;
Branch: release/1.12&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/43ccd6876b6500c8234cac0bd6c4146427ca8897&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/43ccd6876b6500c8234cac0bd6c4146427ca8897&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5667309" author="xgen-internal-githook" created="Tue, 29 Aug 2023 22:07:22 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Qingyang Hu&apos;, &apos;email&apos;: &apos;103950869+qingyang-hu@users.noreply.github.com&apos;, &apos;username&apos;: &apos;qingyang-hu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2423&quot; title=&quot;WaitQueueTimeoutError reports pinned connections when no pinning occurs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2423&quot;&gt;&lt;del&gt;GODRIVER-2423&lt;/del&gt;&lt;/a&gt; Include pinned connections in WaitQueueTimeoutError only for load balanced clusters. (#1353)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/d71481e770066f86bf7ee4fb5baf0b1bae7d1a4d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/d71481e770066f86bf7ee4fb5baf0b1bae7d1a4d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5612013" author="JIRAUSER1259527" created="Thu, 3 Aug 2023 23:31:52 +0000"  >&lt;p&gt;Ways this error could be better:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The messaging for total connections uses the description &quot;connections in use by other operations&quot;, which can be misleading in some circumstances. It would be better to just describe it as &quot;open connections&quot;.&lt;/li&gt;
	&lt;li&gt;Maybe add an &quot;idle connections&quot; count as well, although that will probably always be 0. (use &lt;tt&gt;pool.availableConnectionCount&lt;/tt&gt;)&lt;/li&gt;
	&lt;li&gt;Maybe add a &quot;wait duration&quot; value, which is the time spent waiting for a connection. That could be helpful when troubleshooting problems where it&apos;s not clear how long each operation phase (server selection, pool checkout, round trip, etc) took.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Ways to improve pinned cursors info:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Omit the information about pinned connections if the counts are 0. That&apos;s probably good enough to resolve confusion in most cases, but isn&apos;t as explicit when the driver &lt;em&gt;is&lt;/em&gt; pinning connections but there happen to be 0 pinned.&lt;/li&gt;
	&lt;li&gt;Keep track of if any connection has ever been pinned for any reason, and enable pinned connection reporting if so. The main downside is an extra code to maintain.&lt;br/&gt;
E.g.
&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;var hasPinnedToCursor sync.Bool&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;&amp;nbsp;&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;func (p *pool) pinConnectionToCursor() {&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;    hasPinnedToCursor.Store(true)&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;    // ...&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;}&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;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I think #1 is probably good enough and simpler, but either works.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0dybk:</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>