<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:50:49 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-39033] swap out int and long long for int32_t and int64_t in BSONElement</title>
                <link>https://jira.mongodb.org/browse/SERVER-39033</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It would be helpful to change BSONElement and friends (BSONObjBuilder, etc) to use explicitly-sized types for numbers.  Right now I frequently have to slog through casting between &lt;tt&gt;long long&lt;/tt&gt; and &lt;tt&gt;std::uint64_t&lt;/tt&gt; when working with BSON, and it would be nice to have things work more seamlessly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="673267">SERVER-39033</key>
            <summary>swap out int and long long for int32_t and int64_t in BSONElement</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-execution">Backlog - Storage Execution Team</assignee>
                                    <reporter username="milkie@mongodb.com">Eric Milkie</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Jan 2019 14:41:44 +0000</created>
                <updated>Tue, 6 Dec 2022 03:08:04 +0000</updated>
                            <resolved>Thu, 2 Jul 2020 19:54:04 +0000</resolved>
                                                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2116939" author="milkie" created="Wed, 16 Jan 2019 15:38:43 +0000"  >&lt;p&gt;Right, I don&apos;t want a BSONObjBuilder::append() function that takes a std::uint64_t to append a NumberLong.&#160; But changing BSONObjBuilder::appendTimestamp() to take a std::uint64_t instead of an unsigned long long is very desirable.&#160; And changing the append() function that takes a long long to instead take a std::int64_t would also be desirable here.&#160; Basically, swapping out only exact equivalent types.&lt;/p&gt;</comment>
                            <comment id="2116931" author="acm" created="Wed, 16 Jan 2019 15:30:50 +0000"  >&lt;p&gt;Overall, though, I think we agree. I&apos;d like the types that the builder offers to be more exact with respect to both what the BSON standard offers and the dedicated fixed-width C++ types, have fewer overloads, and require callers to be explicit.&lt;/p&gt;</comment>
                            <comment id="2116928" author="acm" created="Wed, 16 Jan 2019 15:29:49 +0000"  >&lt;p&gt;Ah, I was noticing your complaint about unsigned 64-bit types in particular. I think you &lt;b&gt;should&lt;/b&gt; need to cast there, because of the unsigned-ness. I don&apos;t want to paper over that for callers.&lt;/p&gt;

&lt;p&gt;A boxed type meaning a dedicated structure for each type: &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/blob/master/src/bsoncxx/types.hpp#L82-L105&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/blob/master/src/bsoncxx/types.hpp#L82-L105&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2116919" author="milkie" created="Wed, 16 Jan 2019 15:23:35 +0000"  >&lt;p&gt;I think my description was a bit unclear, as I do not want any more overloads (hence &quot;swap out&quot; in the title).&#160;&lt;/p&gt;

&lt;p&gt;Specifically, the BSON spec says &quot;int32&quot; and &quot;int64&quot;, so I think we should have&#160;BSONElement::numberInt() and BSONElement::numberLong() return std::int32_t and std::int64_t.&#160; I&apos;m not sure what a boxed type is.&lt;/p&gt;</comment>
                            <comment id="2116904" author="acm" created="Wed, 16 Jan 2019 15:11:46 +0000"  >&lt;p&gt;I&apos;d argue we should go the other way, and reduce the space of types the builder accepts: the builder API should offer only exactly the types that the BSON spec declares to be supported. Only the caller can know for sure what the correct interpretation/conversion should be for other types, so that should be decided at the call site. Adding more overloads I think just increases the risk of subtle errors.&lt;/p&gt;

&lt;p&gt;The C++ driver takes this approach, and even goes a little further: its BSON builder only accepts boxed BSON types like &lt;tt&gt;b_int&lt;/tt&gt;, &lt;tt&gt;b_double&lt;/tt&gt;, etc.&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>5.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 16 Jan 2019 15:11:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 4 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-648</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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 4 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-execution</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hujgiv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr5h2v:</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_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|huj2s7:</customfieldvalue>

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