<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:33:43 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-33534] Ensure that OpObservers function properly for writes as part of transactions</title>
                <link>https://jira.mongodb.org/browse/SERVER-33534</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We need to make sure that all systems that use OpObservers to maintain in-memory state are prepared for their OpObserver to fire long before the operation is committed.  Most of them should already be doing any work they need to undo in an onCommit hook, but some of them make changes speculatively then register onRollback handlers instead.&lt;/p&gt;</description>
                <environment></environment>
        <key id="503268">SERVER-33534</key>
            <summary>Ensure that OpObservers function properly for writes as part of transactions</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="matthew.russotto@mongodb.com">Matthew Russotto</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Feb 2018 23:18:23 +0000</created>
                <updated>Sun, 29 Oct 2023 22:34:22 +0000</updated>
                            <resolved>Fri, 13 Apr 2018 20:08:34 +0000</resolved>
                                                    <fixVersion>3.7.4</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1864138" author="xgen-internal-githook" created="Fri, 13 Apr 2018 20:07:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;matthew.russotto@10gen.com&apos;, &apos;name&apos;: &apos;Matthew Russotto&apos;, &apos;username&apos;: &apos;mtrussotto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33534&quot; title=&quot;Ensure that OpObservers function properly for writes as part of transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33534&quot;&gt;&lt;del&gt;SERVER-33534&lt;/del&gt;&lt;/a&gt; Re-enable non-replication opObserver functionality within transactions.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9056c4d63c3beaae5a5444cb3ad37b61037ae561&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9056c4d63c3beaae5a5444cb3ad37b61037ae561&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1856934" author="matthew.russotto" created="Thu, 5 Apr 2018 20:44:12 +0000"  >&lt;p&gt;The work done by onUpdate in opObservers is&lt;/p&gt;

&lt;p&gt;AuthorizationManager::logOp(), which works on admin.system.roles, admin.system.users, admin.system.version.  There may be an issue when updating admin.system.users; the user cache is invalidated immediately instead of on commit.  However, since it is not legal to modify system collections in transactions, I will not fix this as part of this ticket&lt;/p&gt;

&lt;p&gt;CollectionShardingState::onUpdateOp().  This correctly does work at commit time; however, it expects to have an opTime and if it does not, it may not call &quot;sessionSource-&amp;gt;notifyNewWriteOpTime&quot; &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/3f723beb10caf6bd809b7df05c34b6a97402dadb/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp#L174&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/3f723beb10caf6bd809b7df05c34b6a97402dadb/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp#L174&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will fix this by arranging for the CollectionShardingState to be notified on commit as well as on update.&lt;/p&gt;

&lt;p&gt;Scope:storedFuncMod():  This affects the system.js collection in any database.  It correctly does work on commit, but this means changes to the system.js collection will not be affected within the uncommitted transaction context.  Because changes to collections in system namespaces are not supported within a transaction, I will not fix this in this ticket.&lt;/p&gt;

&lt;p&gt;DurableViewCatalog::onExternalChange:  Similar to Scope::storedFuncMod(), only with system.views collection.  Not supported.&lt;/p&gt;

&lt;p&gt;FeatureCompatibilityVersion::onInsertOrUpdate(): admin.system.version namespace.  It is definitely not supported to update feature compatibility transactionally.&lt;/p&gt;

&lt;p&gt;SessionCatalog::invalidateSessions: Affects the config.transactions namespace.  Writing that within a transaction should not be supported, and in fact already uasserts.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/66c537372c0aa54819adb7f72c9eda6cf8750f8e/src/mongo/db/session_catalog.cpp#L161&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/66c537372c0aa54819adb7f72c9eda6cf8750f8e/src/mongo/db/session_catalog.cpp#L161&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;onDelete() hits the same set of operations except CollectionShardingState::onDeleteOp()&lt;/p&gt;

&lt;p&gt;onInsert() same except CollectionShardingState::onInsertOp()&lt;/p&gt;</comment>
                            <comment id="1817898" author="spencer" created="Tue, 27 Feb 2018 23:19:16 +0000"  >&lt;p&gt;As part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32320&quot; title=&quot;Push applyOps oplog entry generation into logOp on transaction commit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32320&quot;&gt;&lt;del&gt;SERVER-32320&lt;/del&gt;&lt;/a&gt; we are temporarily disabling the processing of all OpObservers for writes as part of transactions.  We&apos;ll need to undo that as part of this work as well.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="471962">SERVER-32323</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.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>Thu, 5 Apr 2018 20:44:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 43 weeks, 5 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-718</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>
                            5 years, 43 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>matthew.russotto@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htral3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9lcn:</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="2187">Repl 2018-04-09</customfieldvalue>
    <customfieldvalue id="2188">Repl 2018-04-23</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|htqwrb:</customfieldvalue>

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