<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:02:28 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-43175] update mongo/platform/endian.h</title>
                <link>https://jira.mongodb.org/browse/SERVER-43175</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This is a very low-level bare metal header, and should ideally #include only std headers.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Decimal128 doesn&apos;t need endian conversions, and makes endian.h transitively include several higher-level mongo specifics. Current conversions are underspecified and mathematically incorrect or at least ambiguous. They swap the order within each of the low64 and high64 fields, but don&apos;t swap them with each other.  This is behavior needed only by one spot in db/pipeline/value.cpp to deserialize NumberDecimal, so we can just inline the behavior there and remove it from endian.h.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The running compiler holds the ultimate truth on what the target endianness is (available via _&lt;em&gt;BYTE_ORDER&lt;/em&gt;_). We should not read it from a config header. The names exported into C++ code for the endian possibilities can be changed to line up with those in C++20&apos;s std::endian 
{big,little,native}
&lt;p&gt; enum. Remove MONGO_CONFIG_BYTE_ORDER from config.h. This eliminates the Scons&amp;lt;=&amp;gt;C++ bridge protocol of &quot;1234&quot; and &quot;4321&quot; magic numbers. Then Scons only talks to the compiler, not to the code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Use enum expressions (including if constexpr) rather than #if for branching on endianness. This makes bit-rot of unexecuted paths less likely, and is just cleaner C++.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;endian.h supports noisy old #if//#elif/... branches for getting compiler-builtin bswap operations. Can reduce to a simple MSVC vs GCC branching. All compilers have a builtin, so remove the bswap_slow&quot; implementation.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Don&apos;t need all the push_macro / pop_macro stuff, or really any macros at all. Just rely on inline C++ functions. These optimize to the same thing. Don&apos;t need ByteOrderConverter or IntegralTypeMap either. Simpler metaprogramming will work fine. All in all we can utterly remove 400 lines of code there.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="917737">SERVER-43175</key>
            <summary>update mongo/platform/endian.h</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="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="billy.donahue@mongodb.com">Billy Donahue</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Sep 2019 16:27:09 +0000</created>
                <updated>Sun, 29 Oct 2023 22:17:26 +0000</updated>
                            <resolved>Thu, 3 Oct 2019 19:16:26 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2447333" author="xgen-internal-githook" created="Wed, 2 Oct 2019 14:19:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43175&quot; title=&quot;update mongo/platform/endian.h&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43175&quot;&gt;&lt;del&gt;SERVER-43175&lt;/del&gt;&lt;/a&gt; platform/endian.h refresh&lt;/p&gt;

&lt;p&gt;    This is a very low-level bare metal header, and should ideally&lt;br/&gt;
    #include only std headers.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Remove Decimal128 dependency from endian.h.  Decimal128 doesn&apos;t&lt;br/&gt;
    need endian conversions, and makes endian.h transitively include&lt;br/&gt;
    several higher-level mongo specifics. Current conversions are&lt;br/&gt;
    underspecified and mathematically incorrect or at least ambiguous.&lt;br/&gt;
    They swap the order within each of the low64 and high64 fields,&lt;br/&gt;
    but don&apos;t swap them with each other. This is behavior needed only&lt;br/&gt;
    by one spot in db/pipeline/value.cpp to deserialize NumberDecimal,&lt;br/&gt;
    so we can just inline the behavior there and remove it from&lt;br/&gt;
    endian.h.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Remove MONGO_CONFIG_BYTE_ORDER from config.h.  The running compiler&lt;br/&gt;
    holds the ultimate truth on what the target endianness is&lt;br/&gt;
    (available via &lt;em&gt;BYTE_ORDER&lt;/em&gt;). We should not read it from a config&lt;br/&gt;
    header. The names exported into C++ code for the endian&lt;br/&gt;
    possibilities can be changed to line up with those in C++20&apos;s&lt;br/&gt;
    std::endian 
{big,little,native}
&lt;p&gt; enum. This eliminates the&lt;br/&gt;
    Scons&amp;lt;=&amp;gt;C++ bridge protocol of &quot;1234&quot; and &quot;4321&quot; magic numbers.&lt;br/&gt;
    Scons will talk to the compiler, not directly to the code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Use enum expressions (including if constexpr) rather than #if for&lt;br/&gt;
    branching on endianness. This makes bit-rot of unexecuted paths&lt;br/&gt;
    less likely, and is just cleaner C++.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Remove bswap_slow variants. All supported compilers have builtin&lt;br/&gt;
    bswap operations. Can reduce to a simple MSVC vs GCC branching.&lt;br/&gt;
    All compilers have a builtin, so remove the bswap_slow&quot;&lt;br/&gt;
    implementation.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Don&apos;t need all the push_macro / pop_macro stuff, or really any&lt;br/&gt;
    macros at all. Just rely on inline C++ functions. These optimize to&lt;br/&gt;
    the same thing.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Don&apos;t need ByteOrderConverter or IntegralTypeMap traits either.&lt;br/&gt;
    Simpler metaprogramming based only on sizeof will work fine.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    All in all we can remove about 400 lines of old code here and&lt;br/&gt;
    shave some low-level edges off of the dependency graph.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;benchmark&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3175a30264d26b31309e9a4abfb69d9f14136702&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3175a30264d26b31309e9a4abfb69d9f14136702&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="2424662" author="billy.donahue" created="Wed, 18 Sep 2019 20:16:41 +0000"  >&lt;p&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/499180013/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/499180013/&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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 2 Oct 2019 14:19:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 19 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_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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 19 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvooef:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvdecv:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3280">Dev Tools 2019-09-23</customfieldvalue>
    <customfieldvalue id="3281">Dev Tools 2019-10-07</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|hvoanr:</customfieldvalue>

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