<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:40:16 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-79175] Improve AutoStatsTracker usage in distinct and find commands</title>
                <link>https://jira.mongodb.org/browse/SERVER-79175</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;With the move towards using acquisitions we discovered that a lot of our current testing infrastructure relies on entries being present in the profiling collection. Previously the necessary setup was performed &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4761d14b3921be3fcd3c205d6f22fafa07c76527/src/mongo/db/db_raii.cpp#L1028&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;within the AutoGetCollectionForReadCommand&lt;/a&gt; family of classes.&lt;/p&gt;

&lt;p&gt;With the move towards shard role acquisitions, we had to resort to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4761d14b3921be3fcd3c205d6f22fafa07c76527/src/mongo/db/commands/distinct.cpp#L279&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;manually setting it up in the commands&lt;/a&gt;, resulting in very large chunks of code that are replicated on other integrations.&lt;/p&gt;

&lt;p&gt;This ticket is about finding a better way to encapsulate this pattern.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2397740">SERVER-79175</key>
            <summary>Improve AutoStatsTracker usage in distinct and find commands</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="3">Duplicate</resolution>
                                        <assignee username="backlog-server-catalog-and-routing">Backlog - Catalog and Routing</assignee>
                                    <reporter username="jordi.olivares-provencio@mongodb.com">Jordi Olivares Provencio</reporter>
                        <labels>
                            <label>techdebt</label>
                    </labels>
                <created>Fri, 21 Jul 2023 10:51:02 +0000</created>
                <updated>Thu, 14 Dec 2023 19:36:12 +0000</updated>
                            <resolved>Thu, 14 Dec 2023 11:07:59 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5933158" author="haley.connelly" created="Thu, 7 Dec 2023 16:00:31 +0000"  >&lt;p&gt;Passing this ticket to the backlog so it can be re-prioritized after the investigation.&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Investigation Main Takeaway&lt;/b&gt;: &lt;br/&gt;
The code is not complex comparatively&#160; to other usage of AutoStatsTracker. We could simply remove the TODOs and work toward a future where we redesign / rethink how we record operation metrics.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83174&quot; title=&quot;AutoStatsTracker contract is unclear&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83174&quot;&gt;SERVER-83174&lt;/a&gt; AutoStatsTracker contract is unclear: We probably should re-asses the use of the AutoStatsTracker throughout the codebase and figure out a more systematic way to use it.&lt;/li&gt;
	&lt;li&gt;The profiler captures error messages when a command fails. We can&apos;t just remove testing logic that tests for transient StaleConfig exceptions and simplify the code to use AutoStatsTracker after the lock acquisition, or we risk not catching non-transient errors we would have otherwise caught.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5849820" author="haley.connelly" created="Thu, 2 Nov 2023 16:00:00 +0000"  >&lt;blockquote&gt;&lt;p&gt;&#160;current testing infrastructure relies on entries being present in the profiling collection.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;For example, safe_secondary_reads_drop_recreate.js relies on the find operation to utilize the AutoStatsTracker so the profiler logs when a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/36ae3cfc5d338423cbcc34572a30cad503be35e2/jstests/sharding/safe_secondary_reads_drop_recreate.js#L439-L458&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;StaleConfig is thrown&lt;/a&gt; for a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/36ae3cfc5d338423cbcc34572a30cad503be35e2/jstests/sharding/safe_secondary_reads_drop_recreate.js#L235-L236&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;successful find operation&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="2498335">SERVER-83174</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2525414">SERVER-84200</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2510864">SERVER-83657</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2498335">SERVER-83174</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 2 Nov 2023 16:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 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_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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-catalog-and-routing</customfieldvalue>
            <customfieldvalue>haley.connelly@mongodb.com</customfieldvalue>
            <customfieldvalue>jordi.olivares-provencio@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2ixen:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2dc8m:</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="7539">Execution EMEA Team 2023-09-04</customfieldvalue>
    <customfieldvalue id="7684">Execution EMEA Team 2023-09-18</customfieldvalue>
    <customfieldvalue id="7685">Execution EMEA Team 2023-10-02</customfieldvalue>
    <customfieldvalue id="7722">Execution EMEA Team 2023-10-16</customfieldvalue>
    <customfieldvalue id="7888">CAR Team 2023-11-13</customfieldvalue>
    <customfieldvalue id="7889">CAR Team 2023-11-27</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|i2ijjz:</customfieldvalue>

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