<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:51:22 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-83145] Shared buffer fragment incorrectly tracks memory usage in freeUnused()</title>
                <link>https://jira.mongodb.org/browse/SERVER-83145</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We decrement from memUsage when we free unused buffers from _activeBuffers &lt;a href=&quot;https://github.com/10gen/mongo/blob/v7.0/src/mongo/util/shared_buffer_fragment.h#L236-L238&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. The calculation is incorrect and undercounts actual freed memory causing the memUsage stat to balloon. This can be a problem when the memusage stat grows past the in-memory limit for the sorter resulting in &lt;a href=&quot;https://github.com/10gen/mongo/blob/4cdac1e55c22b2aa66ad5ba3d47181f7c80d1e29/src/mongo/db/sorter/sorter.cpp#L730-L732&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;spilling to disk&lt;/a&gt; on every key added to the sorter, eventually leading to an OOM issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2497214">SERVER-83145</key>
            <summary>Shared buffer fragment incorrectly tracks memory usage in freeUnused()</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="louis.williams@mongodb.com">Louis Williams</assignee>
                                    <reporter username="shinyee.tan@mongodb.com">Shin Yee Tan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Nov 2023 20:27:36 +0000</created>
                <updated>Mon, 29 Jan 2024 20:07:19 +0000</updated>
                            <resolved>Thu, 25 Jan 2024 18:17:03 +0000</resolved>
                                    <version>6.0.4</version>
                    <version>6.2.0-rc0</version>
                                    <fixVersion>7.0.6</fixVersion>
                    <fixVersion>6.0.14</fixVersion>
                    <fixVersion>8.0.0-rc0</fixVersion>
                    <fixVersion>7.3.0-rc2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="6050426" author="xgen-internal-githook" created="Mon, 29 Jan 2024 19:52:40 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louiswilliams@users.noreply.github.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83145&quot; title=&quot;Shared buffer fragment incorrectly tracks memory usage in freeUnused()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83145&quot;&gt;&lt;del&gt;SERVER-83145&lt;/del&gt;&lt;/a&gt; Correctly track memory usage in SharedBufferFragment (#18234)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: cf21f604fdeef621f7782092ad637a89e57e1549&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1b600236e98f6d5e84df36611df2b2b6d79aa896&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1b600236e98f6d5e84df36611df2b2b6d79aa896&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6045569" author="xgen-internal-githook" created="Fri, 26 Jan 2024 19:23:59 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louiswilliams@users.noreply.github.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83145&quot; title=&quot;Shared buffer fragment incorrectly tracks memory usage in freeUnused()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83145&quot;&gt;&lt;del&gt;SERVER-83145&lt;/del&gt;&lt;/a&gt; Correctly track memory usage in SharedBufferFragment (#18234)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 6c4aec482bb15f917219a01aec332de557f77ac8&lt;br/&gt;
Branch: v7.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e76c1f5de4438982de8028668e3dd7a1b8797c39&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e76c1f5de4438982de8028668e3dd7a1b8797c39&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6045516" author="xgen-internal-githook" created="Fri, 26 Jan 2024 19:11:55 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louiswilliams@users.noreply.github.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83145&quot; title=&quot;Shared buffer fragment incorrectly tracks memory usage in freeUnused()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83145&quot;&gt;&lt;del&gt;SERVER-83145&lt;/del&gt;&lt;/a&gt; Correctly track memory usage in SharedBufferFragment (#18234)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: e6685de50d2a7556e2f2f9a8c52d30145d1256c9&lt;br/&gt;
Branch: v7.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f880039d428b51a1260b65a1524cb5f30f2a19eb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f880039d428b51a1260b65a1524cb5f30f2a19eb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6042194" author="xgen-internal-githook" created="Thu, 25 Jan 2024 18:10:50 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louiswilliams@users.noreply.github.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83145&quot; title=&quot;Shared buffer fragment incorrectly tracks memory usage in freeUnused()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83145&quot;&gt;&lt;del&gt;SERVER-83145&lt;/del&gt;&lt;/a&gt; Correctly track memory usage in SharedBufferFragment (#18234)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 4ea6987aa035bbb75cf585b7390f70e5921b9ac5&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/51d0db82a4b3f89fc031898d944d6c8f1088f1b2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/51d0db82a4b3f89fc031898d944d6c8f1088f1b2&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                        <issuelink>
            <issuekey id="2093900">SERVER-68125</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2470696">SERVER-82037</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25136"><![CDATA[Storage Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="27038"><![CDATA[v7.3]]></customfieldvalue>
    <customfieldvalue key="25578"><![CDATA[v7.0]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001yJV9sQAG]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 22 Jan 2024 18:16:15 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 week, 2 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>louis.williams@mongodb.com</customfieldvalue>
            <customfieldvalue>shinyee.tan@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2zz13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2jxc5:</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="7566">Execution Team 2023-12-11</customfieldvalue>
    <customfieldvalue id="7852">Execution Team 2024-01-08</customfieldvalue>
    <customfieldvalue id="7995">Execution Team 2024-01-22</customfieldvalue>
    <customfieldvalue id="7996">Execution Team 2024-02-05</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;const maxMemUsageMB = 50;&lt;br/&gt;
const replSet = new ReplSetTest({&lt;br/&gt;
&#160; &#160; nodes: 1,&lt;br/&gt;
&#160; &#160; nodeOptions: &lt;/p&gt;
{
&#160; &#160; &#160; &#160; setParameter: \{maxIndexBuildMemoryUsageMegabytes: maxMemUsageMB, heapProfilingEnabled: true}
&lt;p&gt;&#160; &#160; },&lt;br/&gt;
});&lt;br/&gt;
replSet.startSet();&lt;br/&gt;
replSet.initiate();&lt;/p&gt;

&lt;p&gt;const primary = replSet.getPrimary();&lt;br/&gt;
const testDB = primary.getDB(&apos;test&apos;);&lt;br/&gt;
const coll = testDB.index_build_wildcard;&lt;/p&gt;

&lt;p&gt;&#160;&lt;br/&gt;
const docs = 1000;&lt;br/&gt;
const bigArr = new Array(100000).fill(&apos;x&apos;.repeat(10));&lt;br/&gt;
let d = 0;&lt;br/&gt;
while (d &amp;lt; docs) {&lt;br/&gt;
constbulk=coll.initializeUnorderedBulkOp();&lt;br/&gt;
for (leti=0; i&amp;lt;10; i++) &lt;/p&gt;
{
bulk.insert(\{a: (d+i) +&apos;x&apos;.repeat(1000), arr: bigArr}
&lt;p&gt;);&lt;br/&gt;
}&lt;br/&gt;
d+=10;&lt;br/&gt;
print(d);&lt;br/&gt;
assert.commandWorked(bulk.execute());&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;coll.createIndex({&quot;$**&quot;: 1});&lt;/p&gt;</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|i2zl6f:</customfieldvalue>

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