<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:58:15 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>[DOCS-9384] BSON spec conflicts with documentation over Timestamp structure</title>
                <link>https://jira.mongodb.org/browse/DOCS-9384</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;blockquote&gt;&lt;p&gt;Timestamp - Special internal type used by MongoDB replication and sharding. First 4 bytes are an increment, second 4 are a timestamp.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;http://bsonspec.org/spec.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bsonspec.org/spec.html&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Timestamp values are a 64 bit value where:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;the first 32 bits are a time_t value (seconds since the Unix epoch)&lt;/li&gt;
	&lt;li&gt;the second 32 bits are an incrementing ordinal for operations within a given second.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://docs.mongodb.com/v3.2/reference/bson-types/#timestamps&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/v3.2/reference/bson-types/#timestamps&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="334465">DOCS-9384</key>
            <summary>BSON spec conflicts with documentation over Timestamp structure</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="andrew.feierabend@mongodb.com">Andrew Feierabend</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Nov 2016 09:26:01 +0000</created>
                <updated>Mon, 30 Oct 2023 22:24:43 +0000</updated>
                            <resolved>Tue, 1 Oct 2019 18:02:07 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>bsonspec</component>
                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="2543527" author="xgen-internal-githook" created="Fri, 15 Nov 2019 17:43:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Feierabend&apos;, &apos;username&apos;: &apos;andf-mongodb&apos;, &apos;email&apos;: &apos;andrew.feierabend@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-9384&quot; title=&quot;BSON spec conflicts with documentation over Timestamp structure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-9384&quot;&gt;&lt;del&gt;DOCS-9384&lt;/del&gt;&lt;/a&gt; Clarify BSON timestamp endianness&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/521a44dbc9feedf67053f11cb6d5b5900f2ab337&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/521a44dbc9feedf67053f11cb6d5b5900f2ab337&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2543526" author="xgen-internal-githook" created="Fri, 15 Nov 2019 17:43:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Feierabend&apos;, &apos;username&apos;: &apos;andf-mongodb&apos;, &apos;email&apos;: &apos;andrew.feierabend@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-9384&quot; title=&quot;BSON spec conflicts with documentation over Timestamp structure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-9384&quot;&gt;&lt;del&gt;DOCS-9384&lt;/del&gt;&lt;/a&gt; Clarify BSON timestamp endianness&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/0b141f0b9e5b00e051e43582ef7874b6b8aba517&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/0b141f0b9e5b00e051e43582ef7874b6b8aba517&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2543512" author="xgen-internal-githook" created="Fri, 15 Nov 2019 17:35:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Feierabend&apos;, &apos;username&apos;: &apos;andf-mongodb&apos;, &apos;email&apos;: &apos;andrew.feierabend@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-9384&quot; title=&quot;BSON spec conflicts with documentation over Timestamp structure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-9384&quot;&gt;&lt;del&gt;DOCS-9384&lt;/del&gt;&lt;/a&gt; Clarify BSON timestamp endianness&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/02946395644760aff596632b28df26362305f57c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/02946395644760aff596632b28df26362305f57c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2543403" author="xgen-internal-githook" created="Fri, 15 Nov 2019 16:35:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Feierabend&apos;, &apos;username&apos;: &apos;andf-mongodb&apos;, &apos;email&apos;: &apos;andrew.feierabend@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-9384&quot; title=&quot;BSON spec conflicts with documentation over Timestamp structure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-9384&quot;&gt;&lt;del&gt;DOCS-9384&lt;/del&gt;&lt;/a&gt; Clarify BSON timestamp endianness&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/522d636e9b3ad84639fe73df36a73dc00cc0156b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/522d636e9b3ad84639fe73df36a73dc00cc0156b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2443538" author="andrew.feierabend" created="Tue, 1 Oct 2019 18:03:02 +0000"  >&lt;p&gt;Updated language to discuss endianness in context of this field.&lt;/p&gt;</comment>
                            <comment id="1478481" author="jmikola@gmail.com" created="Tue, 17 Jan 2017 20:58:39 +0000"  >&lt;p&gt;Side note: Timestamps are &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f96f0ea2279962f31b18af1232ef11acfcb9f932/src/mongo/bson/bsonelement.cpp#L878&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;compared as &lt;tt&gt;unsigned long long&lt;/tt&gt; values&lt;/a&gt; in the server. When the type is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/adbd05f44bb218f60233493ecbda6f29c60aeeec/src/mongo/bson/timestamp.h#L75&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;converted to an &lt;tt&gt;unsigned long long&lt;/tt&gt;&lt;/a&gt;, the 4-byte time component is always shifted to the most significant bits. This ensures that the time is compared before the incrementing ordinal on all platforms, regardless of endianness.&lt;/p&gt;</comment>
                            <comment id="1478461" author="jmikola@gmail.com" created="Tue, 17 Jan 2017 20:51:42 +0000"  >&lt;p&gt;After sorting through the server source a bit more (with some help from &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch&quot; class=&quot;user-hover&quot; rel=&quot;david.storch&quot;&gt;david.storch&lt;/a&gt;), &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt; and I concluded that &lt;a href=&quot;http://bsonspec.org/spec.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSON spec&lt;/a&gt; is correct and the MongoDB manual is need of a fix.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/bson-types/#timestamps&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSON Types: Timestamps&lt;/a&gt; says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Timestamp values are a 64 bit value where:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;the first 32 bits are a time_t value (seconds since the Unix epoch)&lt;/li&gt;
	&lt;li&gt;the second 32 bits are an incrementing ordinal for operations within a given second.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;This should say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Timestamp values are a 64 bit value where:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;the most significant 32 bits are a time_t value (seconds since the Unix epoch)&lt;/li&gt;
	&lt;li&gt;the least significant 32 bits are an incrementing ordinal for operations within a given second.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;That page does not reiterate the fact that BSON is little endian; however, this effectively means that the first four bytes contain the ordinal, followed by the time component. I believe BSON&apos;s little endianness is only discussed on the spec website, where we say &quot;Each type must be serialized in little-endian format.&quot; If we ever decide to reiterate BSON&apos;s little endianness in our manual, it may be helpful to add a note clarifying how most and least significant in this instance relates to byte order.&lt;/p&gt;
</comment>
                            <comment id="1478420" author="david.golden" created="Tue, 17 Jan 2017 20:22:18 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmikola&quot; class=&quot;user-hover&quot; rel=&quot;jmikola&quot;&gt;jmikola&lt;/a&gt;, I see.  This ticket is reporting that the spec is wrong.  That wasn&apos;t clear from the subject.&lt;/p&gt;

&lt;p&gt;Looking at some implementations as well as the BSON corpus, I&apos;m surprised this wasn&apos;t caught earlier.    We&apos;ll also need SPEC and DRIVER tickets for this if you haven&apos;t filed them.&lt;/p&gt;

&lt;p&gt;In any case, I&apos;ve looked at the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/bson/timestamp.h#L75-L80&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;server source&lt;/a&gt; and agree that the &lt;b&gt;first&lt;/b&gt; 4 bytes are the timestamp and the second 4 are the increment.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=allison.moore&quot; class=&quot;user-hover&quot; rel=&quot;allison.moore&quot;&gt;allison.moore&lt;/a&gt;, the &lt;b&gt;spec&lt;/b&gt; needs to be changed to match the documentation.&lt;/p&gt;</comment>
                            <comment id="1478400" author="jmikola@gmail.com" created="Tue, 17 Jan 2017 20:05:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt;: In this case, &lt;a href=&quot;http://bsonspec.org/spec.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSON spec&lt;/a&gt; is actually incorrect. The first four bytes in a BSON timestamp are the time_t value, followed by an incrementing ordinal. This is akin to an ObjectID being prefixed with a timestamp for sorting purposes.&lt;/p&gt;</comment>
                            <comment id="1478379" author="allison.moore@10gen.com" created="Tue, 17 Jan 2017 19:55:32 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt; Excellent. Thanks!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="334468">PHPC-845</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="346428">DOCS-9787</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 17 Jan 2017 19:46:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 12 weeks, 5 days 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>DOCSP-1769</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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 12 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>allison.moore@mongodb.com</customfieldvalue>
            <customfieldvalue>andrew.feierabend@mongodb.com</customfieldvalue>
            <customfieldvalue>david.golden@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jmikola@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmc73:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hss9m7:</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>0.5</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrzpbr:</customfieldvalue>

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