<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:27:28 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-31566] Sessions with transaction history may become unusable if the oplog rolls over</title>
                <link>https://jira.mongodb.org/browse/SERVER-31566</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Sessions, which have ever had retryable write operations run on them (i.e. operations with txnNumber/stmtId) require the complete transaction oplog chain for the most-recently executed transaction to be available so that the executed statements can be &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ed1b71a50b45b93f0952e1482643c0d9216731d/src/mongo/db/session.cpp#L136&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;loaded&lt;/a&gt; and cached.&lt;/p&gt;

&lt;p&gt;If the oplog rolls over and part of that transaction&apos;s chain is lost for such a session AND the session gets dropped from the cache for any reason (be it step-down, restart, direct write to config.transactions, etc), from that point onward that session will become unusable and all operations using it will start failing with error code &lt;tt&gt;IncompleteTransactionHistory (217)&lt;/tt&gt;, regardless of whether they contain retryable writes or not.&lt;/p&gt;

&lt;p&gt;NOTE: The problem will go away once the session gets cleaned up as idle.&lt;/p&gt;</description>
                <environment></environment>
        <key id="445132">SERVER-31566</key>
            <summary>Sessions with transaction history may become unusable if the oplog rolls over</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="13201">Fixed</resolution>
                                        <assignee username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</assignee>
                                    <reporter username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Oct 2017 19:49:14 +0000</created>
                <updated>Mon, 30 Oct 2023 23:12:46 +0000</updated>
                            <resolved>Mon, 30 Oct 2017 20:28:05 +0000</resolved>
                                    <version>3.6.0-rc0</version>
                                    <fixVersion>3.6.0-rc2</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1712939" author="xgen-internal-githook" created="Mon, 30 Oct 2017 20:26:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;kaloian.manassiev@mongodb.com&apos;, &apos;name&apos;: &apos;Kaloian Manassiev&apos;, &apos;username&apos;: &apos;kaloianm&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31566&quot; title=&quot;Sessions with transaction history may become unusable if the oplog rolls over&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31566&quot;&gt;&lt;del&gt;SERVER-31566&lt;/del&gt;&lt;/a&gt; Handle truncated oplog at session load time&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/350ee88b33f32b179b636f33b7db5b0c03932d24&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/350ee88b33f32b179b636f33b7db5b0c03932d24&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1712938" author="xgen-internal-githook" created="Mon, 30 Oct 2017 20:26:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;kaloian.manassiev@mongodb.com&apos;, &apos;name&apos;: &apos;Kaloian Manassiev&apos;, &apos;username&apos;: &apos;kaloianm&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31566&quot; title=&quot;Sessions with transaction history may become unusable if the oplog rolls over&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31566&quot;&gt;&lt;del&gt;SERVER-31566&lt;/del&gt;&lt;/a&gt; Pull the session transaction fetch logic into a separate function&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/23ddb651c92d0310e8eddb12e89116463fa4ca8b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/23ddb651c92d0310e8eddb12e89116463fa4ca8b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1711429" author="kaloian.manassiev" created="Fri, 27 Oct 2017 18:21:15 +0000"  >&lt;p&gt;After further discussion, it was decided that there is merit in being able to opportunistically perform retryability check based on the statements which are still present in the oplog, but if any other entries are missing, only then fail the operation.&lt;/p&gt;</comment>
                            <comment id="1699199" author="kaloian.manassiev" created="Sun, 15 Oct 2017 13:31:03 +0000"  >&lt;p&gt;This would stop being a problem of course once the session gets cleaned up, because there won&apos;t be an entry for it anymore in &lt;tt&gt;config.transactions&lt;/tt&gt;. So essentially the problem will happen only if the oplog rolls over before the session has been garbage collected as idle.&lt;/p&gt;

&lt;p&gt;This indeed seems like an acceptable behaviour and there&apos;s really no way to prevent it other than requiring customers to have oplog, which is larger than the session cleanup interval of 30 minutes. If a session ever enters in this state, it can be fixed by just deleting the session, so it gets recreated cleanly.&lt;/p&gt;

&lt;p&gt;Based on this I propose that we close it as &apos;Works as Designed&apos;.&lt;/p&gt;</comment>
                            <comment id="1699197" author="kaloian.manassiev" created="Sun, 15 Oct 2017 13:23:32 +0000"  >&lt;p&gt;It is the former - the oplog needs to roll over only for the most-recently executed transaction. It will prevent new transactions from even starting on the session, because we cache the transaction&apos;s statements early (when the session is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0ed1b71a50b45b93f0952e1482643c0d9216731d/src/mongo/db/session.cpp#L136&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;refreshed&lt;/a&gt;), which in turn happens at check-out time. So sessions, which drop out of the cache in this state won&apos;t be able to be checked-out again.&lt;/p&gt;</comment>
                            <comment id="1699080" author="schwerin" created="Sat, 14 Oct 2017 19:55:17 +0000"  >&lt;p&gt;The &quot;complete transaction oplog chain&quot; is a chain of operations for only the most recent transaction on the session, or for all transactions that ever ran on the session? The former seems ok, the latter seems a little hard to work with.&lt;/p&gt;

&lt;p&gt;Also, why does this stop new transactions from beginning on the session?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 14 Oct 2017 19:55:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 15 weeks, 2 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_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 27 Oct 2017 00:00:00 +0000</customfieldvalue>

                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 15 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hthrlb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht9muf:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1956">Sharding 2017-11-13</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 13 Oct 2017 00:00:00 +0000</customfieldvalue>

                        </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>
                                

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

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