<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:13:17 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-26812] top command counters should not be able to move backwards</title>
                <link>https://jira.mongodb.org/browse/SERVER-26812</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We already test that top counters don&apos;t move backwards, but we don&apos;t seem to actually guarantee it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="327402">SERVER-26812</key>
            <summary>top command counters should not be able to move backwards</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="jonathan.reams@mongodb.com">Jonathan Reams</reporter>
                        <labels>
                            <label>open_todo_in_code</label>
                            <label>query-44-grooming</label>
                    </labels>
                <created>Thu, 27 Oct 2016 18:51:35 +0000</created>
                <updated>Tue, 6 Dec 2022 04:13:02 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1611471" author="charlie.swanson" created="Fri, 30 Jun 2017 15:17:16 +0000"  >&lt;p&gt;Summarizing comments above and some of my own investigation: &lt;/p&gt;

&lt;p&gt;Most (maybe all?) of the top recording goes through helpers in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.5.9/src/mongo/db/db_raii.h&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;db_raii.h&lt;/a&gt;/cpp, where we use a &lt;tt&gt;Timer&lt;/tt&gt; to track the elapsed milliseconds. This timer uses the system tick source, which is sometimes monotonically increasing, but sometimes subject to move backwards/forwards if the clock was changed for some reason. If we want to avoid weird reporting problems when the system time is changed, we&apos;d have to guarantee usage of a monotonically increasing clock. There are &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.5.9/src/mongo/db/service_context.h#L396-L410&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;three things attached to the global service context: a TickSource, a precise ClockSource, and a fast ClockSource&lt;/a&gt;. It&apos;s my understanding that none of these guarantee a monotonically increasing time, so are not suitable if we want to avoid the problem reported here.&lt;/p&gt;

&lt;p&gt;The proposal is to add a new clock source to the service context which is monotonic, then explicitly using that clock source for the &lt;tt&gt;Timer&lt;/tt&gt; object on the &lt;tt&gt;AutoStatsTracker&lt;/tt&gt; in db_raii.h.&lt;/p&gt;

&lt;p&gt;This seems like a lot of work for not that much gain (relatively), so the query team has decided to move this to the backlog.&lt;/p&gt;</comment>
                            <comment id="1425635" author="xgen-internal-githook" created="Thu, 3 Nov 2016 21:01:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jbreams&apos;, u&apos;name&apos;: u&apos;Jonathan Reams&apos;, u&apos;email&apos;: u&apos;jbreams@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23976&quot; title=&quot;repairDatabase command on a new, different-cased database terminates server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23976&quot;&gt;&lt;del&gt;SERVER-23976&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26812&quot; title=&quot;top command counters should not be able to move backwards&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26812&quot;&gt;SERVER-26812&lt;/a&gt; fix clang format&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3d0f477cb2466a386a4f1fe5d020f4801f79ef78&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3d0f477cb2466a386a4f1fe5d020f4801f79ef78&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1425540" author="xgen-internal-githook" created="Thu, 3 Nov 2016 19:48:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jbreams&apos;, u&apos;name&apos;: u&apos;Jonathan Reams&apos;, u&apos;email&apos;: u&apos;jbreams@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26812&quot; title=&quot;top command counters should not be able to move backwards&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26812&quot;&gt;SERVER-26812&lt;/a&gt; Don&apos;t check that time moves forward in top stats when we don&apos;t guarantee it&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0bac17d6a2950613b5e9793dd1aa328bc4a3b5e3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0bac17d6a2950613b5e9793dd1aa328bc4a3b5e3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1420932" author="schwerin" created="Fri, 28 Oct 2016 19:08:24 +0000"  >&lt;p&gt;This might actually be a &quot;fix the test&quot; scenario. I mean, what if instead of setting the clock backwards, the user inadvertently set the clock forwards several hours. That would make any operations running during that period to look like they took several hours when they did not. This seems at least as bad as the operations taking negative time, but there&apos;s not really anything we can do about it without detecting clock adjustments.&lt;/p&gt;

&lt;p&gt;Because these counters are &lt;b&gt;only&lt;/b&gt; used for reporting and not for waiting, it might be reasonable to use the monotonic clock instead. However, if we do this, we should attach a monotonic clock source to the ServiceContext and use that, to make it easier to mock and test.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 27 Oct 2016 19:21:45 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 32 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>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>
                            6 years, 32 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jonathan.reams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjsdr:</customfieldvalue>

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

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