<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:58:18 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-21751] Change _id format in local.startup_log collection to avoid duplicate key errors in systems missing RTC</title>
                <link>https://jira.mongodb.org/browse/SERVER-21751</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We are running mongod on an embedded device (sounds weird, I know...), and since we have no RTC on the device, it always starts from epoch.&lt;/p&gt;

&lt;p&gt;This makes the logging at startup likely to fail after a few boots, since the _id key is constructed from the system hostname appended with the milliseconds since epoch:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/db.cpp#L215&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/db/db.cpp#L215&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would it be possible to make the index key an auto incremented value or something similar?&lt;/p&gt;

&lt;p&gt;Until now, I have mitigated the problem by removing the startup logging entirely from db/db.cpp:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/db.cpp#L647&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/db/db.cpp#L647&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can this cause be problems in other conexts?&lt;/p&gt;</description>
                <environment></environment>
        <key id="242045">SERVER-21751</key>
            <summary>Change _id format in local.startup_log collection to avoid duplicate key errors in systems missing RTC</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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-security">Backlog - Security Team</assignee>
                                    <reporter username="mnhu">Martin Hundeb&#248;ll</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Dec 2015 08:21:34 +0000</created>
                <updated>Tue, 6 Dec 2022 04:38:22 +0000</updated>
                                                                            <component>Admin</component>
                    <component>Diagnostics</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1200898" author="schwerin" created="Fri, 11 Mar 2016 18:32:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mnhu&quot; class=&quot;user-hover&quot; rel=&quot;mnhu&quot;&gt;mnhu&lt;/a&gt;, if MongoDB supported auto-increment fields, your proposal would be the obvious choice. Unfortunately, MongoDB does not support auto-increment fields because of their implications for sharded (partitioned) clusters.&lt;/p&gt;</comment>
                            <comment id="1196861" author="mnhu" created="Tue, 8 Mar 2016 20:37:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt;, unfortunately no. We have wifi, which I believe is used to source entropy, but I am not sure. And it isn&apos;t guaranteed to up and running at boot.&lt;/p&gt;

&lt;p&gt;Since it is for diagnostic purposes, wouldn&apos;t it make sense to use an (auto) incremental value as index, and simply log the time in a non-unique field instead?&lt;/p&gt;</comment>
                            <comment id="1196380" author="milkie" created="Tue, 8 Mar 2016 15:39:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mnhu&quot; class=&quot;user-hover&quot; rel=&quot;mnhu&quot;&gt;mnhu&lt;/a&gt;, do you know the answer for Andy&apos;s question posed above?  In order to reliably generate random numbers without collisions, for our _id values, an embedded system needs a source of entropy.&lt;/p&gt;</comment>
                            <comment id="1104593" author="schwerin" created="Thu, 3 Dec 2015 18:00:10 +0000"  >&lt;p&gt;In this embedded scenario, do you have a good source of entropy for random number generation?&lt;/p&gt;</comment>
                            <comment id="1104361" author="ramon.fernandez" created="Thu, 3 Dec 2015 15:33:21 +0000"  >&lt;p&gt;Thanks for your report &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mnhu&quot; class=&quot;user-hover&quot; rel=&quot;mnhu&quot;&gt;mnhu&lt;/a&gt;. Unfortunately there&apos;s currently no way to avoid those collisions when the clock jumps back to the past. Note that &lt;a href=&quot;https://docs.mongodb.org/manual/reference/local-database/#local.startup_log&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the entries in &lt;tt&gt;local.startup_log&lt;/tt&gt; are mostly there for diagnostic purposes&lt;/a&gt;, so I don&apos;t think removing them will have any negative side effects.&lt;/p&gt;

&lt;p&gt;We&apos;re going to keep this ticket open to discuss options about the &lt;tt&gt;_id&lt;/tt&gt; for the documents in the &lt;tt&gt;startup_log&lt;/tt&gt; collection, and whether they can/should be changed to some other format.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="119434">SERVER-13146</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25129"><![CDATA[Server Security]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 3 Dec 2015 13:18:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 48 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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</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>
                            7 years, 48 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-security</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>mnhu</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkn33:</customfieldvalue>

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

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