<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:33:21 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-13940] Documents deleted by TTL are not reflected in deleted docs in serverStatus nor db.currentOp()</title>
                <link>https://jira.mongodb.org/browse/SERVER-13940</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;While debugging a cluster with degraded performance I noticed very high lock usage and disk utilisation. Only when I looked at db.currentOp(true) to see ALL queries running (including background threads and such) I found the TTL query. &lt;/p&gt;

&lt;p&gt;It would be nice if this query would be revealed at db.currentOp() (without the flag) and more importantly, the deleted documents will be revealed in serverStatus and therefore mongostat.&lt;/p&gt;

&lt;p&gt;I understand this might not be a bug and it works as designed, and serverStatus contains the number of deleted documents through TTL under metrics.ttl.deleted but it&apos;s still confusing.&lt;/p&gt;</description>
                <environment></environment>
        <key id="136384">SERVER-13940</key>
            <summary>Documents deleted by TTL are not reflected in deleted docs in serverStatus nor db.currentOp()</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-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="alonho">Alon Horev</reporter>
                        <labels>
                            <label>community-team</label>
                    </labels>
                <created>Wed, 14 May 2014 11:34:04 +0000</created>
                <updated>Mon, 19 Jun 2023 16:55:56 +0000</updated>
                                                                            <component>Diagnostics</component>
                                        <votes>3</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="1853121" author="acsrujan" created="Tue, 3 Apr 2018 07:56:17 +0000"  >&lt;p&gt;I know this is old thread, should we add TTL operations in mongostat?&lt;/p&gt;</comment>
                            <comment id="1345318" author="david.hatch" created="Tue, 2 Aug 2016 21:24:44 +0000"  >&lt;p&gt;In &lt;tt&gt;db.serverStatus&lt;/tt&gt;, documents deleted due to an expiration in the TTL index are not reflected in &lt;tt&gt;serverStatus.opcounters.delete&lt;/tt&gt; or in &lt;tt&gt;serverStatus.metrics.document.deleted&lt;/tt&gt;.   &lt;tt&gt;mongostat&lt;/tt&gt; reads from &lt;tt&gt;serverStatus.opcounters&lt;/tt&gt;, and so does not report TTL deletes as well.  Documents deleted by TTL indexes are only reported in &lt;tt&gt;serverStatus.metrics.ttl.deletedDocuments&lt;/tt&gt;, which is potentially confusing.&lt;/p&gt;

&lt;p&gt;The behavior of &lt;tt&gt;db.currentOp(true)&lt;/tt&gt; in our documentation is specified as including &quot;operations on idle connections and system operations.&quot;&lt;/p&gt;

&lt;p&gt;We should:&lt;/p&gt;

&lt;p&gt;1. consider clarifying our &lt;tt&gt;currentOp&lt;/tt&gt; documentation to provide TTL indexes as an example of a system operation&lt;br/&gt;
2. determine  whether we would like to include TTL deletes in the deletion opcounters or not.  If not, we should likely clarify that &lt;tt&gt;opcounters.delete&lt;/tt&gt; only includes operations issued by the user.&lt;/p&gt;</comment>
                            <comment id="632026" author="matt.kangas@10gen.com" created="Mon, 23 Jun 2014 22:32:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alonho&quot; class=&quot;user-hover&quot; rel=&quot;alonho&quot;&gt;alonho&lt;/a&gt; - you said:&lt;/p&gt;

&lt;p&gt;&amp;gt; It would be nice if this query would be revealed at db.currentOp() (without the flag) and more importantly, the deleted documents will be revealed in serverStatus and therefore mongostat.&lt;/p&gt;

&lt;p&gt;Focusing on serverStatus and considering Asya&apos;s notes above, what changes to &lt;a href=&quot;http://docs.mongodb.org/manual/reference/command/serverStatus/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;serverStatus&lt;/a&gt; would you recommend?&lt;/p&gt;

&lt;p&gt;Currently available:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;serverStatus.metrics.document.deleted
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;deleted reports the total number of documents deleted&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;serverStatus.metrics.ttl.deletedDocuments
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;deletedDocuments reports the total number of documents deleted from collections with a ttl index.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Is there another metric we should provide?&lt;/p&gt;</comment>
                            <comment id="631533" author="asya" created="Mon, 23 Jun 2014 16:26:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alonho&quot; class=&quot;user-hover&quot; rel=&quot;alonho&quot;&gt;alonho&lt;/a&gt; note that you can see the TTL (and migration) deletes on secondaries - on primaries the counts de facto represent the write operations initiated by the client (right or wrong, that&apos;s how it is at the moment).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001tvTj1QAE]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 2 Jun 2014 18:32:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 45 weeks, 1 day 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_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 45 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alonho</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>david.hatch</customfieldvalue>
            <customfieldvalue>matt.kangas</customfieldvalue>
            <customfieldvalue>acsrujan</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlv07:</customfieldvalue>

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

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

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