<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:41 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>[GODRIVER-2469] NewInsufficientBytesError should not create a stack trace</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2469</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary &lt;/h4&gt;
&lt;p&gt;&lt;tt&gt;NewInsufficientBytesError&lt;/tt&gt; creates a stack trace, which allocates a lot of memory.  For some reason, this is called a lot during normal operations, particularly by the &lt;tt&gt;Elements&lt;/tt&gt; function.&lt;/p&gt;

&lt;p&gt;When ADL does format conversions, such as to Parquet, we recursively traverse documents and have observed trace memory allocations significantly greater than the underlying data traversed.  This may be related to OOM problems we&apos;ve seen in production.  See attached pprof image.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;
&lt;p&gt;1.9.0&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;
&lt;p&gt;Traverse a large amount of BSON documents with &lt;tt&gt;Elements&lt;/tt&gt; and look at memory allocations with the profiler.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;The stack trace appears to have been introduced in the original codebase.  The function to retrieve it, &lt;tt&gt;ErrorStack&lt;/tt&gt;, does not appear to be used in the codebase.  Because bsoncore is under bsonx, it should be safe to remove the stack trace functionality as it doesn&apos;t affect external, stable APIs.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2075123">GODRIVER-2469</key>
            <summary>NewInsufficientBytesError should not create a stack trace</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="matt.dale@mongodb.com">Matt Dale</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Jun 2022 14:25:46 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:32 +0000</updated>
                            <resolved>Wed, 6 Jul 2022 19:24:57 +0000</resolved>
                                    <version>1.9.0</version>
                                    <fixVersion>1.10.0</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4651921" author="xgen-internal-githook" created="Thu, 30 Jun 2022 23:48:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2469&quot; title=&quot;NewInsufficientBytesError should not create a stack trace&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2469&quot;&gt;&lt;del&gt;GODRIVER-2469&lt;/del&gt;&lt;/a&gt; Remove the stack trace from the InsufficientBytesError type. (#1002)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/2d577b30d5cae1471af134c6b1a5f4f979c10c37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/2d577b30d5cae1471af134c6b1a5f4f979c10c37&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4651895" author="JIRAUSER1259527" created="Thu, 30 Jun 2022 23:09:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;david.golden@mongodb.com&quot;&gt;david.golden@mongodb.com&lt;/a&gt; thanks for the additional context. This still seems like a straightforward improvement. A side benefit is we get to remove the &lt;tt&gt;github.com/go-stack/stack&lt;/tt&gt; dependency. PR &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/1002&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/1002&lt;/a&gt; is approved, waiting for tests to complete before merge. I&apos;m marking this for release with Go Driver v1.10.0.&lt;/p&gt;</comment>
                            <comment id="4643678" author="david.golden" created="Tue, 28 Jun 2022 03:05:53 +0000"  >&lt;p&gt;It was a bug, where &lt;tt&gt;Elements&lt;/tt&gt; was being called on a nil pointer and the error was being ignored.  So fixing that bug avoids the stack traces, but nevertheless, it seemed better to not have them anyway.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="386436" name="2022-06-23_10-21.png" size="358596" author="david.golden@mongodb.com" created="Thu, 23 Jun 2022 14:21:32 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <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>GODRIVER-1693</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY23Q2</label>
            <label>FY23Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0iki8:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>