<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:34:31 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-14334] Possible double-counting of timeLockedMicros</title>
                <link>https://jira.mongodb.org/browse/SERVER-14334</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I&apos;ve observed what appear to be strange lock time values in my mongod log file.&lt;/p&gt;

&lt;p&gt;I&apos;ve got entries for two separate collections, col1 (no indexes apart from on _id) and col2 (index on _id plus two further indexes, one on a single key and one a compound on two keys - both ascending). For example:&lt;/p&gt;

&lt;p&gt;2014-06-16T16:15:55.690+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn441056&amp;#93;&lt;/span&gt; insert dbname.col1 ninserted:2 keyUpdates:0 numYields:0 locks(micros) w:106859 106ms&lt;br/&gt;
2014-06-16T16:28:55.608+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn441056&amp;#93;&lt;/span&gt; insert dbname.col2 ninserted:1 keyUpdates:0 numYields:0 locks(micros) w:237838 119ms&lt;/p&gt;

&lt;p&gt;The vast majority of my col1 log entries show the write lock time to be either almost identical to, or significantly less than, the query time. However, the vast majority of my col2 entries show the write lock time to be double the query execution time.&lt;/p&gt;

&lt;p&gt;I&apos;ve tried profiling these queries and can see that the time is taken up in timeLocked not timeAcquiring, for example:&lt;br/&gt;
{ &quot;op&quot; : &quot;insert&quot;, &quot;ns&quot; : &quot;dbname.col2&quot;, &quot;ninserted&quot; : 1, &quot;keyUpdates&quot; : 0, &quot;numYield&quot; : 0, &quot;lockStats&quot; : { &quot;timeLockedMicros&quot; : &lt;/p&gt;
{ &quot;r&quot; : NumberLong(0), &quot;w&quot; : NumberLong(1186366) }
&lt;p&gt;, &quot;timeAcquiringMicros&quot; : &lt;/p&gt;
{ &quot;r&quot; : NumberLong(0), &quot;w&quot; : NumberLong(51) }
&lt;p&gt; }, &quot;millis&quot; : 593, &quot;execStats&quot; : {  }, &quot;ts&quot; : ISODate(&quot;2014-06-20T16:33:55.763Z&quot;), &quot;client&quot; : &quot;10.0.4.4&quot;, &quot;allUsers&quot; : [ ], &quot;user&quot; : &quot;&quot; }&lt;/p&gt;

&lt;p&gt;I know from the documentation that timeLockedMicros can be larger than mills due to locks on the oplog, but it seems strange that timeLockedMicros is only double on one of the two collections.&lt;/p&gt;

&lt;p&gt;This behaviour has been observed on MongoDB 2.6.0 (mongodb-org package) on Ubuntu 13.04 64-bit.&lt;/p&gt;</description>
                <environment></environment>
        <key id="143456">SERVER-14334</key>
            <summary>Possible double-counting of timeLockedMicros</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="-1">Unassigned</assignee>
                                    <reporter username="gregmurphy">Greg Murphy</reporter>
                        <labels>
                            <label>polish</label>
                    </labels>
                <created>Mon, 23 Jun 2014 09:46:28 +0000</created>
                <updated>Mon, 20 Jun 2016 20:29:22 +0000</updated>
                            <resolved>Mon, 20 Jun 2016 20:29:22 +0000</resolved>
                                    <version>2.6.0</version>
                                                    <component>Diagnostics</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="1300305" author="ian@10gen.com" created="Mon, 20 Jun 2016 20:29:22 +0000"  >&lt;p&gt;The locking code was entirely rewritten for 3.0 and the statistics code has undergone a complete rewrite as well.  Please re-open if you believe that the current version is still exhibiting problematic behavior.&lt;/p&gt;</comment>
                            <comment id="637190" author="matt.kangas@10gen.com" created="Sat, 28 Jun 2014 03:02:20 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gregmurphy&quot; class=&quot;user-hover&quot; rel=&quot;gregmurphy&quot;&gt;gregmurphy&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Based on my reading of previous tickets, this appears to be working correctly but I agree it is confusing. &lt;a href=&quot;http://docs.mongodb.org/manual/reference/method/db.currentOp/#currentOp.locks&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;db.currentOp()&lt;/a&gt; displays more detail about locks than profiling will reveal. The additional time goes to recursive locks taken for &quot;extra system&quot; work.&lt;/p&gt;

&lt;p&gt;If there are specific queries that you would like an explanation for, please try to capture both the profile and currentOp values and I&apos;ll be happy to help.&lt;/p&gt;

&lt;p&gt;We are reworking how locking works currently in 2.7. I will leave this ticket as a request for more clarity in profile entries about lock utilization.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="60050">SERVER-7994</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 23 Jun 2014 11:41:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 34 weeks, 2 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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 34 weeks, 2 days ago
                        </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>gregmurphy</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.kangas</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlswf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrzxc7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>123958</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|hsguaf:</customfieldvalue>

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