<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:30:46 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-53387] Large internal metadata can trigger BSONObjectTooLarge for commands under the BSON size limit</title>
                <link>https://jira.mongodb.org/browse/SERVER-53387</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Before an internal request is sent, metadata may be &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b83bf99b6e48e2f41ea3b1e7ed6aeb4cf1eb0d31/src/mongo/executor/network_interface_tl.cpp#L470&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;added to it through registered hooks&lt;/a&gt;&#160;(e.g. $clusterTime, $audit). Eventually this metadata is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b83bf99b6e48e2f41ea3b1e7ed6aeb4cf1eb0d31/src/mongo/client/async_client.cpp#L315-L316&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;combined with the request&apos;s command body&lt;/a&gt; into &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/rpc/op_msg.h#L171-L176&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;an op msg&lt;/a&gt;, which will fail with&#160;BSONObjectTooLarge if the combined size of the metadata and command body is over the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b83bf99b6e48e2f41ea3b1e7ed6aeb4cf1eb0d31/src/mongo/bson/bsonobj.h#L104&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSONObjMaxInternalSize limit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a problem for commands that are dynamically built within the server that can be near the size limit (like batch writes) because they don&apos;t currently account for the exact size of the metadata to be added, which can cause persistent&#160;BSONObjectTooLarge errors if the metadata is large enough, like with complicated LDAP roles (which leads to large $audit metadata).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1570311">SERVER-53387</key>
            <summary>Large internal metadata can trigger BSONObjectTooLarge for commands under the BSON size limit</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="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-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="jack.mulrow@mongodb.com">Jack Mulrow</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Dec 2020 15:33:32 +0000</created>
                <updated>Fri, 6 Oct 2023 15:58:49 +0000</updated>
                                                                                                <votes>6</votes>
                                    <watches>53</watches>
                                                                                                                <comments>
                            <comment id="3633103" author="JIRAUSER1256931" created="Wed, 24 Feb 2021 17:25:02 +0000"  >&lt;p&gt;To add some additional context to this issue w.r.t. Change Events (&lt;a href=&quot;https://jira.mongodb.org/browse/HELP-22469&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;HELP-22469&lt;/a&gt;), we wanted to bring up the potential case (although very unlikely) where there&apos;s a 16MB pre-image + 16MB update + 16 MB post-image + metadata in the change event, which will be over the 48MB wire limit.&lt;/p&gt;

&lt;p&gt;Although there&apos;s likely compression done over the wire, we wanted to highlight this case for the team. Thanks all!&lt;/p&gt;</comment>
                            <comment id="3536582" author="garaudy.etienne" created="Fri, 18 Dec 2020 18:58:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jack.mulrow&quot; class=&quot;user-hover&quot; rel=&quot;jack.mulrow&quot;&gt;jack.mulrow&lt;/a&gt;&#160;what&apos;s the downside to option 2? Option 1 seems like additional work. Is that true?&lt;/p&gt;</comment>
                            <comment id="3532489" author="jack.mulrow" created="Wed, 16 Dec 2020 15:42:37 +0000"  >&lt;p&gt;Two approaches I can think of to solve this:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Change internally constructed requests to account for the exact size of the metadata to be added instead of using an estimate. We could start with just the commands known to hit this problem, like batch writes.&lt;/li&gt;
	&lt;li&gt;Allow the combined metadata and command body to be over the max internal BSON size limit and instead only throw BSONObjectTooLarge if either is over the limit on its own. The max size for messages on our wire protocol is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/b83bf99b6e48e2f41ea3b1e7ed6aeb4cf1eb0d31/src/mongo/rpc/message.h#L45&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;48MB&lt;/a&gt;, so sending larger BSON should be possible. This can reuse the large BSON support added in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36606&quot; title=&quot;Remove size limits on BSON audit events&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36606&quot;&gt;&lt;del&gt;SERVER-36606&lt;/del&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I prefer option 2), since that should solve this for all internal commands, but I&apos;ll leave both up and we can decide when this ticket is triaged.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2355026">SERVER-77653</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1644511">SERVER-55062</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2003458">SERVER-64592</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000qflSWQAY, 5002K00000tT0fkQAC, 5002K00000uzfFeQAI, 5002K000011EgeLQAS, 5002K000012PDEgQAO, 5002K000012PXZXQA4, 5002K0000133ZalQAE, 5006R00001lQGXsQAO, 5006R00001meaqIQAQ, 5006R00001ssrlyQAA, 5006R00001srI4fQAE, 5006R00001tVBVVQA4]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 Dec 2020 18:58:07 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 50 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/TSEXP-2028'>TSEXP-2028</a></s>]]></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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 50 weeks 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>andrew.palmer@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>garaudy.etienne@mongodb.com</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hym5u7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr4bkn:</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_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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|hyls3j:</customfieldvalue>

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