<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:40 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-2932] Timeout errors that occur while starting a change stream are confusing and non-deterministic</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2932</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;It&apos;s possible that calling &lt;a href=&quot;https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Client.Watch&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Watch&lt;/a&gt; can time out due to the database taking a long time to assemble the initial batch of change stream messages (see below for specifics about how that can happen). If that happens, one of a few timeout conditions can happen non-deterministically:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;A server-side timeout happens (due to the user or CSOT setting &lt;tt&gt;MaxTimeMS&lt;/tt&gt; on the &quot;aggregate&quot; command) and the server returns a &lt;tt&gt;MaxTimeMSExpired&lt;/tt&gt; (code 50) error. The &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/3efbd23a061a4069af96e56b894f4f72bcd51999/mongo/change_stream.go#L302&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;change stream &quot;aggregate&quot; execute loop&lt;/a&gt; will retry the &quot;aggregate&quot; command, which will almost certainly fail because the client-side timeout is about to happen. &lt;a href=&quot;https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Client.Watch&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Watch&lt;/a&gt; will return one of a few client-side timeout errors depending on the exact timing:
	&lt;ol&gt;
		&lt;li&gt;Return a &lt;tt&gt;WaitQueueTimeoutError&lt;/tt&gt; while waiting to check out a connection.&lt;/li&gt;
		&lt;li&gt;Return an &lt;tt&gt;ErrDeadlineWouldBeExceeded&lt;/tt&gt; before sending a retried &quot;aggregate&quot; command.&lt;/li&gt;
		&lt;li&gt;Other client-side timeout errors are possible, but much less likely.&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
	&lt;li&gt;A client-side timeout happens while waiting for the server to respond. The &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/3efbd23a061a4069af96e56b894f4f72bcd51999/mongo/change_stream.go#L302&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;change stream &quot;aggregate&quot; execute loop&lt;/a&gt; will retry the &quot;aggregate&quot; command, which will fail while trying to check out another connection &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/3efbd23a061a4069af96e56b894f4f72bcd51999/mongo/change_stream.go#L326&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. &lt;a href=&quot;https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Client.Watch&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Watch&lt;/a&gt; will return a &lt;tt&gt;WaitQueueTimeoutError&lt;/tt&gt;, when the expected error is something like &quot;incomplete read of message header: context deadline exceeded&quot;.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;All of those errors have the same underlying error: a timeout. The expression in so many seemingly unrelated timeout errors is extremely confusing.&lt;/p&gt;

&lt;p&gt;Definition of done:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#Client.Watch&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Watch&lt;/a&gt; returns an error that accurately reports the underlying failure when there is a server-side or client-side timeout.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="2407598">GODRIVER-2932</key>
            <summary>Timeout errors that occur while starting a change stream are confusing and non-deterministic</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Aug 2023 23:33:57 +0000</created>
                <updated>Sat, 13 Jan 2024 00:50:19 +0000</updated>
                                                                            <component>Change Streams</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2406747">GODRIVER-2929</issuekey>
        </issuelink>
                            </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_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>FY25Q1</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i22pls:</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>