<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:05:01 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-66295] Replace all the usages of ExpressionContext::inMongos with isMongos()</title>
                <link>https://jira.mongodb.org/browse/SERVER-66295</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We don&apos;t need the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6258bc03a01721ff481c44e400fa733113bd64a5/src/mongo/db/pipeline/expression_context.h#L400&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;inMongos&lt;/a&gt; as a parameter of &lt;tt&gt;ExpressionContext&lt;/tt&gt;. We can get this information from the &lt;tt&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/5c38a29c5b658138e95df95dbd32710198b3be49/src/mongo/s/is_mongos.h#L37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongo::isMongos()&lt;/a&gt;&lt;/tt&gt; helper. We should get rid of &lt;tt&gt;inMongos&lt;/tt&gt; in &lt;tt&gt;ExpressionContext&lt;/tt&gt; and replace all the usages with &lt;tt&gt;isMongos()&lt;/tt&gt; helper.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2041508">SERVER-66295</key>
            <summary>Replace all the usages of ExpressionContext::inMongos with isMongos()</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="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="arun.banala@mongodb.com">Arun Banala</reporter>
                        <labels>
                    </labels>
                <created>Fri, 6 May 2022 18:54:56 +0000</created>
                <updated>Tue, 6 Dec 2022 00:08:00 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4535538" author="kaloian.manassiev" created="Mon, 9 May 2022 15:41:39 +0000"  >&lt;p&gt;I can kind of see the value in (1). However, for (2), how do you know that the root operation that sets &lt;tt&gt;$_generateV2ResumeTokens&lt;/tt&gt; isn&apos;t running as a router role on a MongoS and doesn&apos;t need to set that value as well? Not only MongoS nodes need to necessarily run as routers.&lt;/p&gt;</comment>
                            <comment id="4534640" author="arun.banala" created="Mon, 9 May 2022 11:14:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev@mongodb.com&quot;&gt;kaloian.manassiev@mongodb.com&lt;/a&gt; There are a couple of cases that I can think of where we currently need to know to type of the node. (1) a $group or $sort may want to use disk for spilling. So we have to check whether we are running on mongos or mongod to verify this. (2) If we want to set certain internal parameter only on the client request (as was the case for &lt;tt&gt;$_generateV2ResumeTokens&lt;/tt&gt; parameter). The query code currently assumes that the &lt;tt&gt;inMongos&lt;/tt&gt; is only being set on a mongos node. As noted in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-66270&quot; title=&quot;ExpressionContext::inMongos does not reliably reflect the execution context&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-66270&quot;&gt;SERVER-66270&lt;/a&gt;, it looks like &lt;tt&gt;PeriodicShardedIndexConsistencyChecker&lt;/tt&gt; broke this assumption, as it is calling the &lt;tt&gt;ClusterAggregate::runAggregate()&lt;/tt&gt; from a mongod node. Now the &lt;tt&gt;inMongos&lt;/tt&gt; (as a consequence &lt;tt&gt;fromMongos&lt;/tt&gt;) parameters are overloaded, as the rest of the code is using it to check the node type.&lt;/p&gt;</comment>
                            <comment id="4533673" author="kaloian.manassiev" created="Sun, 8 May 2022 14:01:51 +0000"  >&lt;p&gt;What is the reason for having to ask whether a code is running within MongoS or not? Both MongoD and MongoS can have the router role, so whether something is MongoS should be irrelevant.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2040864">SERVER-66270</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 8 May 2022 14:01:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 39 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/SERVER-66270'>SERVER-66270</a>]]></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-1951</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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 39 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>arun.banala@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0tzyv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0cx0g:</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_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|i0tm47:</customfieldvalue>

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