<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:52:27 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-39573] Add unique id to log label &quot;TransactionCoordinator&quot;</title>
                <link>https://jira.mongodb.org/browse/SERVER-39573</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4a0d769e44e6a022e7c129c1beca6a7c86cdd818/src/mongo/db/s/transaction_coordinator_futures_util.h#L86&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;label here&lt;/a&gt; is just a static string and if there are multiple threads running it is hard to read the logs because they would all have the same label in the logs.&lt;/p&gt;</description>
                <environment></environment>
        <key id="689421">SERVER-39573</key>
            <summary>Add unique id to log label &quot;TransactionCoordinator&quot;</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="jack.mulrow@mongodb.com">Jack Mulrow</assignee>
                                    <reporter username="randolph@mongodb.com">Randolph Tan</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Wed, 13 Feb 2019 19:42:40 +0000</created>
                <updated>Sun, 29 Oct 2023 22:24:02 +0000</updated>
                            <resolved>Thu, 22 Aug 2019 18:24:10 +0000</resolved>
                                    <version>4.1.8</version>
                                    <fixVersion>4.2.1</fixVersion>
                    <fixVersion>4.3.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2417992" author="xgen-internal-githook" created="Thu, 12 Sep 2019 14:49:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;jsmulrow&apos;, &apos;email&apos;: &apos;jack.mulrow@mongodb.com&apos;, &apos;name&apos;: &apos;Jack Mulrow&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41376&quot; title=&quot;Track time transactions on mongos are active and inactive and include in slow txn logging&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41376&quot;&gt;&lt;del&gt;SERVER-41376&lt;/del&gt;&lt;/a&gt; Track time transactions on mongos are active and inactive and include in slow txn logging&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 4d59f45f85919ddaffa260fb76d1e7dbd8950edf)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42907&quot; title=&quot;Add timeActiveMicros and timeInactiveMicros for transactions in mongos currentOp output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42907&quot;&gt;&lt;del&gt;SERVER-42907&lt;/del&gt;&lt;/a&gt; Add timeActiveMicros and timeInactiveMicros for transactions in mongos currentOp output&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 387b570d0ddf0dc87c888d030651357152484191)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39573&quot; title=&quot;Add unique id to log label &amp;quot;TransactionCoordinator&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39573&quot;&gt;&lt;del&gt;SERVER-39573&lt;/del&gt;&lt;/a&gt; Prefix TransactionCoordinator logs with transaction id&lt;/p&gt;

&lt;p&gt;(cherry picked from commit f92b912452b540fdcbb1b3b959391fb31e64d408)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42963&quot; title=&quot;For active sessions only set transaction stats in TransactionRouter::Observer::_reportState()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42963&quot;&gt;&lt;del&gt;SERVER-42963&lt;/del&gt;&lt;/a&gt; For active sessions only set transaction stats in TransactionRouter::Observer::_reportState()&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 4b526b31c6560ec4c632c8062b057d4e346fb1d0)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42963&quot; title=&quot;For active sessions only set transaction stats in TransactionRouter::Observer::_reportState()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42963&quot;&gt;&lt;del&gt;SERVER-42963&lt;/del&gt;&lt;/a&gt; Add uses_atclustertime tag to router_transaction_current_op.js&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 936595473bd8423b79e477a442d3093aa11d80c8)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41374&quot; title=&quot;Add currentOpen, currentActive, and currentInactive to mongos transactions serverStatus output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41374&quot;&gt;&lt;del&gt;SERVER-41374&lt;/del&gt;&lt;/a&gt; Track current open, active, and inactive transactions on mongos in serverStatus&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 953e1692d51c6742f1bb1c61dcfece75338afeae)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/523d4a46f4cdc9cc928f85eed2c63bc898c8ca63&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/523d4a46f4cdc9cc928f85eed2c63bc898c8ca63&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2383129" author="jack.mulrow" created="Thu, 22 Aug 2019 18:24:10 +0000"  >&lt;p&gt;I filed&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42971&quot; title=&quot;ThreadClient should restore original thread name on destruction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42971&quot;&gt;&lt;del&gt;SERVER-42971&lt;/del&gt;&lt;/a&gt; to track fixing the ThreadClient behavior, so in my commit for this ticket I only added a transaction id to each transaction coordinator log and did not stop setting &quot;TransactionCoordinator&quot; in the AWS.&lt;/p&gt;</comment>
                            <comment id="2383091" author="xgen-internal-githook" created="Thu, 22 Aug 2019 18:00:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;jsmulrow&apos;, &apos;email&apos;: &apos;jack.mulrow@mongodb.com&apos;, &apos;name&apos;: &apos;Jack Mulrow&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39573&quot; title=&quot;Add unique id to log label &amp;quot;TransactionCoordinator&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39573&quot;&gt;&lt;del&gt;SERVER-39573&lt;/del&gt;&lt;/a&gt; Prefix TransactionCoordinator logs with transaction id&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f92b912452b540fdcbb1b3b959391fb31e64d408&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f92b912452b540fdcbb1b3b959391fb31e64d408&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2369456" author="jack.mulrow" created="Tue, 13 Aug 2019 21:29:41 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt;, yeah I can do that instead. I&apos;ll add a helper that formats a txnId and add it to each log message.&lt;/p&gt;

&lt;p&gt;Also, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi&quot;&gt;esha.maharishi&lt;/a&gt; and I looked into why I was seeing the threads labeled by one transaction logging for different ones, and it turns out the &lt;tt&gt;ThreadClient&lt;/tt&gt;&#160;RAII type used to the set the client name to &quot;TransactionCoordinator&quot; also sets the thread&apos;s name &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1bab7ef943e45caeecbc5aafbca9b5147dbdddb2/src/mongo/db/client.cpp#L163-L173&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;without restoring the original name (if there was one)&lt;/a&gt; in its destructor. The AWS uses &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1bab7ef943e45caeecbc5aafbca9b5147dbdddb2/src/mongo/db/s/transaction_coordinator_futures_util.cpp#L59&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a thread pool&lt;/a&gt;, so it was persistently changing the names of the those threads, and the coordinator &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1bab7ef943e45caeecbc5aafbca9b5147dbdddb2/src/mongo/db/s/transaction_coordinator.cpp#L166&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;switches threads after using the waitForMajority service&lt;/a&gt;, so it was grabbing a thread that had already been set to the name of a different transaction.&lt;/p&gt;

&lt;p&gt;I&apos;m going to file a separate ticket for the ThreadClient behavior, but since we&apos;re currently polluting the names of the threads in the fixed executor pool, in addition to updating the logging I&apos;m going to stop setting the &quot;TransactionCoordinator&quot; name entirely.&lt;/p&gt;</comment>
                            <comment id="2369353" author="renctan" created="Tue, 13 Aug 2019 20:39:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jack.mulrow&quot; class=&quot;user-hover&quot; rel=&quot;jack.mulrow&quot;&gt;jack.mulrow&lt;/a&gt;, what if instead of renaming the thread name, we just prefix our log messages in coordinator/coordinator service with txn + lsid? Kind of similar to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1bab7ef943e45caeecbc5aafbca9b5147dbdddb2/src/mongo/db/transaction_participant.cpp#L1833&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;txnParticipant&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2369308" author="jack.mulrow" created="Tue, 13 Aug 2019 20:18:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt;, is it fine to just append a random number to the client name &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4a0d769e44e6a022e7c129c1beca6a7c86cdd818/src/mongo/db/s/transaction_coordinator_futures_util.h#L86&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; (maybe an OID &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4a0d769e44e6a022e7c129c1beca6a7c86cdd818/src/mongo/db/s/migration_session_id.cpp#L58&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;like we do for migrations&lt;/a&gt;)? I originally thought it made sense to use a label based on the txnId of the coordinator that owns the AWS, but it looks like AWS threads can do work for other transactions, so logging the txnId in the client name wouldn&apos;t be the same as the transaction being logged for, which I think is more confusing than it&apos;s worth.&lt;/p&gt;

&lt;p&gt;cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matthew.saltz&quot; class=&quot;user-hover&quot; rel=&quot;matthew.saltz&quot;&gt;matthew.saltz&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi&quot;&gt;esha.maharishi&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2153287" author="kaloian.manassiev" created="Fri, 15 Feb 2019 15:41:27 +0000"  >&lt;p&gt;This might be good candidate for the diagnostics improvements.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.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_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>Fri, 15 Feb 2019 15:41:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 21 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-1405</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, 21 weeks, 6 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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hum6wf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hv2pl3:</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="3164">Sharding 2019-08-12</customfieldvalue>
    <customfieldvalue id="3197">Sharding 2019-08-26</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|hult5r:</customfieldvalue>

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