<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:22:37 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>[SERVER-72718] Not able to identify the transaction boundaries using ChangeStream</title>
                <link>https://jira.mongodb.org/browse/SERVER-72718</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The MongoDB documentation (&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/change-events/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/reference/change-events/&lt;/a&gt;) specifies that for a change event, the transaction associated with that event can be uniquely identified by the&#160;&lt;tt&gt;lsid&lt;/tt&gt;&#160;and&#160;&lt;tt&gt;txnNumber&lt;/tt&gt; fields in the ChangeStream document.&lt;/p&gt;

&lt;p&gt;The problem during change data capture using ChangeStream is that I&apos;m not able to determine whether the transaction has ended or not unless and otherwise, the next transaction comes in (different &lt;tt&gt;txnNumber&lt;/tt&gt;) or a non-transactional database operation (&lt;tt&gt;lsid&lt;/tt&gt;&#160;and&#160;&lt;tt&gt;txnNumber&lt;/tt&gt;&#160;are&#160;&lt;tt&gt;null&lt;/tt&gt; using the Java driver) is performed. Is there any way to determine if the current transaction has ended or not from the ChangeStream without needing another consecutive operation?&lt;/p&gt;</description>
                <environment></environment>
        <key id="2229963">SERVER-72718</key>
            <summary>Not able to identify the transaction boundaries using ChangeStream</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="9">Done</resolution>
                                        <assignee username="yuan.fang@mongodb.com">Yuan Fang</assignee>
                                    <reporter username="kirupha2000@gmail.com">Kiruphasankaran Nataraj</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Jan 2023 09:45:07 +0000</created>
                <updated>Thu, 19 Jan 2023 06:40:51 +0000</updated>
                            <resolved>Wed, 18 Jan 2023 15:07:51 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5122900" author="JIRAUSER1269550" created="Thu, 19 Jan 2023 06:39:20 +0000"  >&lt;p&gt;Hi Yuan,&lt;/p&gt;

&lt;p&gt;Thanks for your response! One more final clarification. Are the change events of a transaction always guaranteed to appear in the order in which they are executed? For example, if two concurrent transactions are being executed, the below sequence shows the order of the operations being maintained even if the transactions themselves are not grouped together.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation1&lt;/li&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation2&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation1&lt;/li&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation3&lt;/li&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation4&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation2&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation3&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation4&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Is there a possibility of the change events appearing as:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation1&lt;/li&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation2&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation1&lt;/li&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation4&lt;/li&gt;
	&lt;li&gt;txn1&#160; &#160; &#160; -&#160; &#160; &#160; &#160;operation3&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation4&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation3&lt;/li&gt;
	&lt;li&gt;txn2&#160; &#160; &#160;-&#160; &#160; &#160; &#160;operation2&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5119028" author="JIRAUSER1270794" created="Tue, 17 Jan 2023 21:42:34 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kirupha2000%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;kirupha2000@gmail.com&quot;&gt;kirupha2000@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for bringing this to our attention. As you have noted, the feature that specifically identifies the last change event associated with a transaction is not currently supported. It seems that the issue (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40437&quot; title=&quot;[Change Streams] Allow to recognize last change of transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40437&quot;&gt;SERVER-40437&lt;/a&gt;) is backlogged at the moment.&lt;/p&gt;

&lt;p&gt;In response to your question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;is it guaranteed that the change events of a single transaction are always grouped together even if multiple transactions are executed from multiple clients concurrently?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It is not guaranteed that the change events of a MongoDB transaction will always be grouped together. Change events are generated by &lt;a href=&quot;https://www.mongodb.com/docs/manual/core/replica-set-oplog/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Oplog&lt;/a&gt; and the order of events may vary depending on the concurrent nature of the operation. I hope this explanation is helpful.&lt;/p&gt;

&lt;p&gt;If you have any further questions, we highly encourage you to first seek assistance from our community by posting on&#160; &lt;a href=&quot;https://www.mongodb.com/community/forums&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Developer Community Forums&lt;/a&gt;. If the discussion there leads you to suspect a bug in the MongoDB server, then we&apos;d want to investigate it as a possible bug here in the SERVER project.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Yuan&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5111417" author="JIRAUSER1269550" created="Fri, 13 Jan 2023 12:21:25 +0000"  >&lt;p&gt;Based on the comments from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40437&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-40437&lt;/a&gt;, it looks like MongoDB doesn&apos;t currently support determining the boundaries of a transaction. Please correct me if I&apos;m wrong. Also, is it guaranteed that the change events of a single transaction are always grouped together even if multiple transactions are executed from multiple clients concurrently?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="2234398">SERVER-72885</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="727879">SERVER-40437</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2234398">SERVER-72885</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 11 Jan 2023 16:11:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 2 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>kirupha2000@gmail.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 2 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>kirupha2000@gmail.com</customfieldvalue>
            <customfieldvalue>yuan.fang@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1q2dz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i18lds:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[yuan.fang@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1pojb:</customfieldvalue>

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