<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:38:59 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-35151] Track total number of active and inactive transactions in ServerTransactionsMetrics</title>
                <link>https://jira.mongodb.org/browse/SERVER-35151</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We want to track the total number of active and inactive transactions currently running. To do this, we should &lt;tt&gt;currentActive&lt;/tt&gt; and &lt;tt&gt;currentInactive&lt;/tt&gt; counter fields to &lt;tt&gt;ServerTransactionsMetrics&lt;/tt&gt; that track these respective metrics. A transaction is considered &quot;active&quot; if it is currently executing an operation as a part of that transaction, and considered &quot;inactive&quot; if it the transaction is open, but idly waiting for a new operation to occur. The &quot;unstash&quot; and &quot;stash&quot; events are a way to mark the transitions between &quot;active&quot; and &quot;inactive&quot; transaction state i.e. if a transaction&apos;s resources are currently &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3b152ee018a4c88588371ef5f8eb978f7fb8a192/src/mongo/db/session.h#L491-L492&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stashed on the session&lt;/a&gt;, it implies that the transaction is inactive. Whenever a transaction &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3b152ee018a4c88588371ef5f8eb978f7fb8a192/src/mongo/db/session.h#L253-L256&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;becomes &quot;active&quot;&lt;/a&gt; (unstash), we should increment the &lt;tt&gt;ServerTransactionsMetrics::currentActive&lt;/tt&gt; and decrement the &lt;tt&gt;ServerTransactionsMetrics::currentInactive&lt;/tt&gt; counter. Similarly for when it &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3b152ee018a4c88588371ef5f8eb978f7fb8a192/src/mongo/db/session.h#L248-L251&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;becomes &quot;inactive&quot;&lt;/a&gt; (stash). Also, when a transaction first starts, we must increment &lt;tt&gt;currentActive&lt;/tt&gt;. When it finishes (commits or aborts), we must decrement &lt;tt&gt;currentActive&lt;/tt&gt; or &lt;tt&gt;currentInactive&lt;/tt&gt;, depending on the cause of commit/abort i.e. a transaction might abort due to an abort command, in which case it goes from &quot;inactive&quot; =&amp;gt; &quot;aborted&quot;, or it might abort due to a write conflict, in which case it goes from &quot;active&quot; =&amp;gt; &quot;aborted&quot;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="547612">SERVER-35151</key>
            <summary>Track total number of active and inactive transactions in ServerTransactionsMetrics</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="nathan.louie">Nathan Louie</assignee>
                                    <reporter username="william.schultz@mongodb.com">William Schultz</reporter>
                        <labels>
                            <label>global-txn-metrics</label>
                    </labels>
                <created>Tue, 22 May 2018 16:00:08 +0000</created>
                <updated>Sun, 29 Oct 2023 22:31:33 +0000</updated>
                            <resolved>Tue, 26 Jun 2018 14:32:23 +0000</resolved>
                                                    <fixVersion>4.0.2</fixVersion>
                    <fixVersion>4.1.1</fixVersion>
                                    <component>Diagnostics</component>
                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1977930" author="xgen-internal-githook" created="Thu, 16 Aug 2018 20:22:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;nxlouie&apos;, &apos;email&apos;: &apos;nathan.louie@10gen.com&apos;, &apos;name&apos;: &apos;Nathan Louie&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35151&quot; title=&quot;Track total number of active and inactive transactions in ServerTransactionsMetrics&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35151&quot;&gt;&lt;del&gt;SERVER-35151&lt;/del&gt;&lt;/a&gt; Track total number of active/inactive transactions in ServerTransactionsMetrics&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d28c9472878a9e50196c568848c84d6225036406)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/95064cf5603d1c52f952ca5b40251f804eeaf788&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/95064cf5603d1c52f952ca5b40251f804eeaf788&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1931195" author="nathan.louie" created="Mon, 25 Jun 2018 21:45:36 +0000"  >&lt;p&gt;Forgot to rebase before pushing.&lt;/p&gt;</comment>
                            <comment id="1931194" author="nathan.louie" created="Mon, 25 Jun 2018 21:45:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;

{&apos;username&apos;: &apos;nxlouie&apos;, &apos;name&apos;: &apos;Nathan Louie&apos;, &apos;email&apos;: &apos;nathan.louie@10gen.com&apos;}


&lt;p&gt;Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d28c9472878a9e50196c568848c84d6225036406&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d28c9472878a9e50196c568848c84d6225036406&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ace1aec25c5324fb51083e266757e48ef664be55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ace1aec25c5324fb51083e266757e48ef664be55&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/aaec2087d9e70fa24293326bf5297808570dcc11&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/aaec2087d9e70fa24293326bf5297808570dcc11&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fcda650b90f497c26ecfe121249f421adada8451&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fcda650b90f497c26ecfe121249f421adada8451&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6e78c920ab239e415700fedba49d3c08709461e4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6e78c920ab239e415700fedba49d3c08709461e4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a4cc866475278e943d9b840b99185667158db59d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a4cc866475278e943d9b840b99185667158db59d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/70255f060ec9aacdb990a5e37a55c8c7b272c8b8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/70255f060ec9aacdb990a5e37a55c8c7b272c8b8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1924266" author="nathan.louie" created="Mon, 18 Jun 2018 21:55:57 +0000"  >&lt;p&gt;Given that we need to unstash resources before committing as discussed in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35149&quot; title=&quot;Track total number of open transactions in ServerTransactionsMetrics&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35149&quot;&gt;&lt;del&gt;SERVER-35149&lt;/del&gt;&lt;/a&gt;, is it reasonable to say that all commits will decrement the currentActive counter?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="547187">SERVER-35129</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="551445">SERVER-35293</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>4.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.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>Mon, 18 Jun 2018 21:55:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 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[<s><a href='https://jira.mongodb.org/browse/SERVER-35129'>SERVER-35129</a></s>]]></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-1091</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, 25 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>nathan.louie</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|htyou7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htqadz:</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="2298">Repl 2018-07-02</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|htyb3j:</customfieldvalue>

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