<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:58:50 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-63845] Separate interface to get set of referenced variables from DocumentSource::getDependencies()</title>
                <link>https://jira.mongodb.org/browse/SERVER-63845</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &lt;tt&gt;DocumentSource::getDependencies()&lt;/tt&gt; interface currently returns two pieces of information:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The set of depended-on field paths. This is used to internally generate a projection which can result in covered plans, or can prevent downstream pipeline stages from having to process documents containing unnecessary fields.&lt;/li&gt;
	&lt;li&gt;The set of referenced variables. At the moment, this is used only to identify non-correlated $lookup sub-pipeline prefixes, so that the results from such a prefix can be cached and re-used.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Dependency analysis and getting the set of referenced variables are logically different operations, so it makes sense to separate them. Also, it is legal for a &lt;tt&gt;DocumentSource&lt;/tt&gt; to return &lt;tt&gt;DepsTracker::NOT_SUPPORTED&lt;/tt&gt; in order to indicate that it does not participate in dependency analysis &amp;#8211; this makes sense for &quot;source&quot; stages such as $cursor or $mergeCursors. However, &lt;tt&gt;NOT_SUPPORTED&lt;/tt&gt; can be problematic for callers which want to analyze which variables are referenced, since they must defensively assume that &lt;em&gt;any&lt;/em&gt; variable could be referenced. See the fix from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63141&quot; title=&quot;Difference in $lookup/$redact/$let behaviour with pipeline optimization&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63141&quot;&gt;&lt;del&gt;SERVER-63141&lt;/del&gt;&lt;/a&gt; for an example.&lt;/p&gt;

&lt;p&gt;In order to make this more natural for callers which want to analyze variable references, we should change &lt;tt&gt;getDependencies()&lt;/tt&gt; so that it no longer returns the set of referenced variables inside the &lt;tt&gt;DepsTracker&lt;/tt&gt;. In its place we should introduce a new virtual method &lt;tt&gt;DocumentSource::getReferencedVars()&lt;/tt&gt;. This would be a pure virtual function that all &lt;tt&gt;DocumentSource&lt;/tt&gt; derived classes must implement. It would return a set of &lt;tt&gt;Variables::Id&lt;/tt&gt; identifiers.&lt;/p&gt;

&lt;p&gt;As part of this work, we should change the &lt;tt&gt;$$SEARCH_META&lt;/tt&gt; static analysis from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-60800&quot; title=&quot;Allow $search in $lookup/$unionWith&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60800&quot;&gt;&lt;del&gt;SERVER-60800&lt;/del&gt;&lt;/a&gt; to consume the new &lt;tt&gt;DocumentSource::getReferencedVars()&lt;/tt&gt; interface. As of this writing, this code has not landed in the enterprise modules, but the current plan is for it to have an allowlist of stages that don&apos;t support dependency analysis but are known to not have any variable references. The addition of &lt;tt&gt;DocumentSource::getReferencedVars()&lt;/tt&gt; would allow us to replace this workaround with a more easily maintainable solution.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1986567">SERVER-63845</key>
            <summary>Separate interface to get set of referenced variables from DocumentSource::getDependencies()</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="13201">Fixed</resolution>
                                        <assignee username="nicholas.zolnierz@mongodb.com">Nicholas Zolnierz</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Feb 2022 19:05:08 +0000</created>
                <updated>Sun, 29 Oct 2023 21:42:12 +0000</updated>
                            <resolved>Fri, 19 Aug 2022 13:09:42 +0000</resolved>
                                                    <fixVersion>6.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4761854" author="xgen-internal-githook" created="Thu, 18 Aug 2022 20:37:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nicholas Zolnierz&apos;, &apos;email&apos;: &apos;nicholas.zolnierz@mongodb.com&apos;, &apos;username&apos;: &apos;nzolnierzmdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63845&quot; title=&quot;Separate interface to get set of referenced variables from DocumentSource::getDependencies()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63845&quot;&gt;&lt;del&gt;SERVER-63845&lt;/del&gt;&lt;/a&gt; Separate variable reference tracking from pipeline field dependency analysis&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/39a79c12b930b7adc5fe2872e482f9e483121dcf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/39a79c12b930b7adc5fe2872e482f9e483121dcf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4572497" author="david.storch" created="Wed, 25 May 2022 15:15:42 +0000"  >&lt;p&gt;The lack of a separate interface for the variables referenced by a `DocumentSource` was essentially the root cause of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-66548&quot; title=&quot;$lookup sequential cache can incorrectly treat a $facet as non-correlated &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-66548&quot;&gt;&lt;del&gt;SERVER-66548&lt;/del&gt;&lt;/a&gt;. It seems like we&apos;ve had a couple of bugs crop up lately around incorrect detection of the non-correlated pipeline prefix. I think it&apos;s time that we schedule this work. Putting it back into the triage queue.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1974290">SERVER-63141</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2049563">SERVER-66548</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2109850">SERVER-68691</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1901655">SERVER-60800</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>7.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, 28 Mar 2022 19:12:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 24 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_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>
                            1 year, 24 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>6.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>nicholas.zolnierz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0kq33:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i03sfb:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5895">QO 2022-05-30</customfieldvalue>
    <customfieldvalue id="5897">QO 2022-06-13</customfieldvalue>
    <customfieldvalue id="5899">QO 2022-06-27</customfieldvalue>
    <customfieldvalue id="5901">QO 2022-07-11</customfieldvalue>
    <customfieldvalue id="5903">QO 2022-07-25</customfieldvalue>
    <customfieldvalue id="5905">QO 2022-08-08</customfieldvalue>
    <customfieldvalue id="5907">QO 2022-08-22</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|i0kc8f:</customfieldvalue>

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