<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:35:31 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-1036] Skipped change events when using a context timeout on stream.Next in a change stream</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1036</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;I noticed that I was missing change events when using the change stream API.&#160; This seems to be related to my use of a context timeout on the stream.Next() call.&#160;&#160;&lt;/p&gt;

&lt;p&gt;My expectation is that by using a context with timeout I can force the stream.Next() to return after a given amount of time.&#160; I was expecting that when this occurs and stream.Next() returns false, the stream will not advance.&#160; I detect this cancellation and then attempt to call stream.Next() again expecting to get the next result but instead it seems to jump over some results.&lt;/p&gt;

&lt;p&gt;The rationale for using a context timeout is that stream.Next() will not return control to the calling go routine if context.Background() is used.&#160; I wish to regain control to check if the go routine should exit due to some external condition.&#160;&lt;/p&gt;

&lt;p&gt;Attached is go program to replicate the issue.&#160; It should count 10K events but it often comes short of this count.&#160; At the top of the file are two variables (timeoutBug and fixWithRestart) to fix the behavior.&#160; If timeoutBug is turned off then context.Background is used and the count is correct, but control is lost.&#160; if fixWithRestart is turned on then instead of calling stream.Next() again on a context timeout, the stream is restarted from the last received change event.&lt;/p&gt;</description>
                <environment></environment>
        <key id="763869">GODRIVER-1036</key>
            <summary>Skipped change events when using a context timeout on stream.Next in a change stream</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ryan.m.wynn@gmail.com">Ryan Wynn</reporter>
                        <labels>
                            <label>jeff+</label>
                    </labels>
                <created>Fri, 10 May 2019 15:19:53 +0000</created>
                <updated>Fri, 7 Aug 2020 21:22:47 +0000</updated>
                            <resolved>Fri, 7 Aug 2020 21:22:47 +0000</resolved>
                                    <version>1.0.1</version>
                                                    <component>CRUD</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="648820">GODRIVER-682</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="648820">GODRIVER-682</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="216511" name="bug.go" size="2993" author="ryan.m.wynn@gmail.com" created="Fri, 10 May 2019 15:19:47 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000mtaraQAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <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|huo6u7:</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>