<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:45:15 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-58717] Should window-function $push / $addToSet restrict memory usage?</title>
                <link>https://jira.mongodb.org/browse/SERVER-58717</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In $group, the $push and $addToSet accumulators have their own memory limits (as of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44174&quot; title=&quot;$push and $addToSet should restrict memory usage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44174&quot;&gt;&lt;del&gt;SERVER-44174&lt;/del&gt;&lt;/a&gt;).  Should we do something similar when they are used in $setWindowFields?&lt;/p&gt;

&lt;p&gt;AccumulatorPush::processInternal does the check here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/a0198789a90fb099a252a441849ac0678d3862a7/src/mongo/db/pipeline/accumulator_push.cpp#L54&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/a0198789a90fb099a252a441849ac0678d3862a7/src/mongo/db/pipeline/accumulator_push.cpp#L54&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But WindowFunctionPush::add() does not: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a0198789a90fb099a252a441849ac0678d3862a7/src/mongo/db/pipeline/window_function/window_function_push.h#L51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/a0198789a90fb099a252a441849ac0678d3862a7/src/mongo/db/pipeline/window_function/window_function_push.h#L51&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;$group already tracks the total memory usage, to decide when to spill to disk.  I think this extra limit was added because $push and $addToSet don&apos;t really benefit from spilling (if an intermediate result is too big, so will the final result).&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43944&quot; title=&quot;Accumulators (and possibly expressions) can allocate large amounts of memory&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43944&quot;&gt;SERVER-43944&lt;/a&gt;, which asks for a more general solution, for all operators.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1826461">SERVER-58717</key>
            <summary>Should window-function $push / $addToSet restrict memory usage?</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="david.percy@mongodb.com">David Percy</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Tue, 20 Jul 2021 23:28:21 +0000</created>
                <updated>Mon, 28 Aug 2023 16:41:54 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="4091624" author="xgen-internal-githook" created="Wed, 29 Sep 2021 13:52:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Russotto&apos;, &apos;email&apos;: &apos;matthew.russotto@mongodb.com&apos;, &apos;username&apos;: &apos;mtrussotto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58717&quot; title=&quot;Should window-function $push / $addToSet restrict memory usage?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58717&quot;&gt;SERVER-58717&lt;/a&gt; ignore me&lt;br/&gt;
Branch: matthew.russotto/&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57817&quot; title=&quot;Build BackupFileCloner class (based on InitialSyncCloner)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57817&quot;&gt;&lt;del&gt;SERVER-57817&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/c2c0ac558ad0c60a2e1daba081a9599d04b9bdf4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/c2c0ac558ad0c60a2e1daba081a9599d04b9bdf4&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 15 Sep 2021 19:50:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 19 weeks 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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>rachelle.palmer@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 19 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>david.percy@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hztjmv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2yr3:</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="5268">QO 2021-10-18</customfieldvalue>
    <customfieldvalue id="5270">QO 2021-11-01</customfieldvalue>
    <customfieldvalue id="5272">QO 2021-11-15</customfieldvalue>
    <customfieldvalue id="5274">QO 2021-11-29</customfieldvalue>
    <customfieldvalue id="5276">QO 2021-12-13</customfieldvalue>
    <customfieldvalue id="5278">QO 2021-12-27</customfieldvalue>
    <customfieldvalue id="5280">QO 2022-01-10</customfieldvalue>
    <customfieldvalue id="5282">QO 2022-01-24</customfieldvalue>
    <customfieldvalue id="5284">QO 2022-02-07</customfieldvalue>
    <customfieldvalue id="5286">QO 2022-02-21</customfieldvalue>
    <customfieldvalue id="5288">QO 2022-03-07</customfieldvalue>
    <customfieldvalue id="5290">QO 2022-03-21</customfieldvalue>
    <customfieldvalue id="5887">QO 2022-04-04</customfieldvalue>
    <customfieldvalue id="5889">QO 2022-04-18</customfieldvalue>
    <customfieldvalue id="5891">QO 2022-05-02</customfieldvalue>
    <customfieldvalue id="5893">QO 2022-05-16</customfieldvalue>
    <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>

                        </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|hzt5vz:</customfieldvalue>

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