<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:34 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-1271] BSONObjBuilder and BSONArrayBuilder chould have a &apos;done&apos; method that does not return a BSONObj</title>
                <link>https://jira.mongodb.org/browse/SERVER-1271</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;Its frequently the case that you construct a subobject for which you have no interest in the resulting BSONObj, since you only care about the BSONObj for the top level. It would be nice if there was a way to get the &quot;done&quot; behavior, but not spend time constructing a BSONObj just to throw it away. FWIW, the call to BSONObj::init that results from a call to &apos;done&apos; is &lt;em&gt;not&lt;/em&gt; inlined in my build:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    const boost::scoped_ptr&amp;lt;mongo::BSONArrayBuilder&amp;gt; delete_builder( m_builder );&lt;br/&gt;
    m_builder-&amp;gt;done();  // no interest in return value&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;generates the following on my machine (compiled with optimization of course):&lt;/p&gt;


&lt;p&gt;  202310:       53                      push   %rbx&lt;br/&gt;
  202311:       48 83 ec 40             sub    $0x40,%rsp&lt;br/&gt;
  202315:       48 8b 7f 08             mov    0x8(%rdi),%rdi&lt;br/&gt;
  202319:       48 89 7c 24 30          mov    %rdi,0x30(%rsp)&lt;br/&gt;
  20231e:       48 83 c7 08             add    $0x8,%rdi&lt;br/&gt;
  202322:       e8 a9 25 00 00          callq  2048d0 &amp;lt;mongo::BSONObjBuilder::_done()&amp;gt;&lt;br/&gt;
  202327:       48 8d 5c 24 10          lea    0x10(%rsp),%rbx&lt;br/&gt;
  20232c:       31 d2                   xor    %edx,%edx&lt;br/&gt;
  20232e:       48 89 c6                mov    %rax,%rsi&lt;br/&gt;
  202331:       48 c7 44 24 18 00 00    movq   $0x0,0x18(%rsp)&lt;br/&gt;
  202338:       00 00&lt;br/&gt;
  20233a:       48 c7 44 24 20 00 00    movq   $0x0,0x20(%rsp)&lt;br/&gt;
  202341:       00 00&lt;br/&gt;
  202343:       48 89 df                mov    %rbx,%rdi&lt;br/&gt;
  202346:       e8 e5 70 fe ff          callq  1e9430 &amp;lt;mongo::BSONObj::init(char const*, bool)&amp;gt;&lt;br/&gt;
//...&lt;/p&gt;

&lt;p&gt;There is no need for that call to BSONObj::init (inlined or not, not to mention any other construction / destruction code) in this use case.&lt;/p&gt;</description>
                <environment>All</environment>
        <key id="12211">SERVER-1271</key>
            <summary>BSONObjBuilder and BSONArrayBuilder chould have a &apos;done&apos; method that does not return a BSONObj</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="9">Done</resolution>
                                        <assignee username="alerner">Alberto Lerner</assignee>
                                    <reporter username="andrew.morrow@mongodb.com">Andrew Morrow</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Jun 2010 12:40:54 +0000</created>
                <updated>Tue, 12 Jul 2016 00:29:44 +0000</updated>
                            <resolved>Tue, 27 Jul 2010 14:40:38 +0000</resolved>
                                    <version>1.5.3</version>
                                    <fixVersion>1.5.7</fixVersion>
                                    <component>Internal Client</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="16199" author="alerner" created="Tue, 27 Jul 2010 14:40:29 +0000"  >&lt;p&gt;Thanks Andrew Morrow for pointing out the issue and contributing the fix!&lt;/p&gt;</comment>
                            <comment id="16198" author="alerner" created="Tue, 27 Jul 2010 14:38:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;acm&apos;, &apos;name&apos;: &apos;Andrew Morrow&apos;, &apos;email&apos;: &apos;andrew.c.morrow@gmail.com&apos;}
&lt;p&gt;fast done capability for BSONObjBuilder&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/8443231430a20f75b6d44760d87c00fe761b2bc6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/8443231430a20f75b6d44760d87c00fe761b2bc6&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 27 Jul 2010 14:38:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 30 weeks, 1 day 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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 30 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alerner</customfieldvalue>
            <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrj053:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrikk7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21983</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_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|hrkwjz:</customfieldvalue>

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