<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:52:34 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-39610] Reformat TransactionParticipant comments and remove last references to the metrics mutex</title>
                <link>https://jira.mongodb.org/browse/SERVER-39610</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This is just follow up clean up to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38810&quot; title=&quot;Use the Client mutex or the SessionCatalog mutex for concurrency control of the TransactionParticipant&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38810&quot;&gt;&lt;del&gt;SERVER-38810&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Some comments could use &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1d246814a058073f0c26981fff5fe67c16af3593/src/mongo/db/transaction_participant.h#L365-L399&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;rewrapping&lt;/a&gt; and there is a dangling reference to a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1d246814a058073f0c26981fff5fe67c16af3593/src/mongo/db/transaction_participant.cpp#L1447&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;non-existent mutex&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="698759">SERVER-39610</key>
            <summary>Reformat TransactionParticipant comments and remove last references to the metrics mutex</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="william.schultz@mongodb.com">William Schultz</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                            <label>prepare_optional</label>
                    </labels>
                <created>Fri, 15 Feb 2019 18:47:02 +0000</created>
                <updated>Sun, 29 Oct 2023 22:23:58 +0000</updated>
                            <resolved>Wed, 3 Jul 2019 21:11:26 +0000</resolved>
                                                    <fixVersion>4.2.1</fixVersion>
                    <fixVersion>4.3.1</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2373706" author="xgen-internal-githook" created="Thu, 15 Aug 2019 16:11:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;William Schultz&apos;, &apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;username&apos;: &apos;will62794&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39610&quot; title=&quot;Reformat TransactionParticipant comments and remove last references to the metrics mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39610&quot;&gt;&lt;del&gt;SERVER-39610&lt;/del&gt;&lt;/a&gt; Remove outdated references to the metrics mutex in the TransactionParticipant and simplify some metrics reporting logic&lt;/p&gt;

&lt;p&gt;(cherry picked from commit f92ac762f68f65461b060abc6c94fe95446afba6)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9df434b51a1a3ee5cae7b2a1790be48e53534c36&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9df434b51a1a3ee5cae7b2a1790be48e53534c36&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2311803" author="william.schultz" created="Wed, 3 Jul 2019 21:11:11 +0000"  >&lt;p&gt;After looking into further cleanup of the metrics tracking logic, the refactoring seems somewhat non-trivial, and may take more time than I expected. Going to close this ticket since the basic cleanup here is done.&lt;/p&gt;</comment>
                            <comment id="2310401" author="xgen-internal-githook" created="Tue, 2 Jul 2019 21:44:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;William Schultz&apos;, &apos;username&apos;: &apos;will62794&apos;, &apos;email&apos;: &apos;william.schultz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39610&quot; title=&quot;Reformat TransactionParticipant comments and remove last references to the metrics mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39610&quot;&gt;&lt;del&gt;SERVER-39610&lt;/del&gt;&lt;/a&gt; Remove outdated references to the metrics mutex in the TransactionParticipant and simplify some metrics reporting logic&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f92ac762f68f65461b060abc6c94fe95446afba6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f92ac762f68f65461b060abc6c94fe95446afba6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2281519" author="judah.schvimer" created="Wed, 12 Jun 2019 17:26:29 +0000"  >&lt;p&gt;The above SGTM, cleaning up duplicated state seems worthwhile.&lt;/p&gt;</comment>
                            <comment id="2281496" author="william.schultz" created="Wed, 12 Jun 2019 17:17:09 +0000"  >&lt;p&gt;There may be some additional, optional cleanup that can be done here related to metrics tracking. In &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36685&quot; title=&quot;Reverse order of TransactionParticipant (Session in 4.0) and Client locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36685&quot;&gt;&lt;del&gt;SERVER-36685&lt;/del&gt;&lt;/a&gt;, which predated the concurrency control refactoring from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38810&quot; title=&quot;Use the Client mutex or the SessionCatalog mutex for concurrency control of the TransactionParticipant&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38810&quot;&gt;&lt;del&gt;SERVER-38810&lt;/del&gt;&lt;/a&gt;, we introduced a &lt;tt&gt;_metricsMutex&lt;/tt&gt; which was a second mutex in addition to the TransactionParticipant&apos;s own mutex. I believe that we introduced that mutex so that we could access the TransactionMetricsObserver object without needing to acquire the TP mutex. There were some cases where we would be holding the Client lock when calling &lt;tt&gt;reportUnstashedState&lt;/tt&gt; so we made ourselves prone to deadlock since there were &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d351e1d89fe4c26d70ff890444f1b7e5554a0876/src/mongo/db/transaction_participant.cpp#L760&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;other places&lt;/a&gt; where we acquired the TP mutex followed by the Client lock i.e. an opposite lock acquisition order. Now that concurrency control of the TP is mainly handled by the Client lock, it should be safe to read any of the transaction stats data from inside &lt;tt&gt;reportUnstashedState&lt;/tt&gt;, since we should be holding the appropriate Client lock inside there. It seems that some of the state from the TP was duplicated into the SingleTransactionStats class (e.g. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d351e1d89fe4c26d70ff890444f1b7e5554a0876/src/mongo/db/single_transaction_stats.h#L203&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;autocommit&lt;/a&gt;) so that stat reporting could access this data when only holding the metrics mutex and not the TP mutex. We could consider cleaning up any duplicate data and just read it directly from the TP.&lt;/p&gt;</comment>
                            <comment id="2281243" author="william.schultz" created="Wed, 12 Jun 2019 15:13:46 +0000"  >&lt;p&gt;Looks like many of the comments in TransactionParticipant were already re-formatted in this &lt;a href=&quot;https://github.com/mongodb/mongo/commit/d989f45b6f9a802e3d4fe5c4cb34b5ddc28ed4eb#diff-d17191053c93af40f30b4bba3a956600&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;commit&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="588833">SERVER-36685</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="664425">SERVER-38810</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16775"><![CDATA[v4.2]]></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>Wed, 12 Jun 2019 15:13:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 25 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1449</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>
                            4 years, 25 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hunq5r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hur03j:</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="3000">Repl 2019-06-17</customfieldvalue>
    <customfieldvalue id="3001">Repl 2019-07-01</customfieldvalue>
    <customfieldvalue id="3026">Repl 2019-07-15</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|huncf3:</customfieldvalue>

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