<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:12:41 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-15365] Investigate changes in SERVER-56194: Make TTL deletes fair</title>
                <link>https://jira.mongodb.org/browse/DOCS-15365</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>    &lt;div class=&quot;panel&quot; style=&quot;background-color: #c2d2c2;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;background-color: #239eb0;&quot;&gt;&lt;b&gt;Original Downstream Change Summary&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;    Changes to serverStatus:&lt;br/&gt;
The TTL Monitor has a new ServerStatus field ttl.subPasses &lt;/p&gt;

&lt;p&gt;A given TTL pass may consist of 0 to many sub-passes. 0 only in the case the replica set is not in a readable state when the pass begins. &lt;/p&gt;

&lt;p&gt;The ServerStatus ttl.passes field remains the same in that a single pass deletes all expired documents (unless externally interrupted).&lt;/p&gt;

&lt;p&gt;Note: Behavior of the TTLMonitor only changes when server-parameter &apos;ttlMonitorBatchDeletes&apos; is set to true. Otherwise, the TTL Monitor uses legacy behavior and each TTL pass, provided the replica set is in a readable state, consists of a single sub-pass.&lt;/p&gt;

&lt;p&gt;New Behavior: &lt;br/&gt;
If the TTL monitor batches deletes (ttlMonitorBatchDeletes server param), then it provides fair TTL deletion as below.&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The TTL pass consists of zero, one or more subpasses.&lt;/li&gt;
	&lt;li&gt;Each subpass deletes all expired documents on each TTL index in a round-robin fashion.&lt;/li&gt;
	&lt;li&gt;The delete on each TTL index removes up to ttlIndexDeleteTargetDocs or runs up to ttlIndexDeleteTargetTimeMS, whichever happens first. The same TTL index can be queued up to be revisited in the same subpass if there are outstanding deletions.&lt;/li&gt;
	&lt;li&gt;A TTL index is not visited any longer in a subpass once all documents are deleted.&lt;/li&gt;
	&lt;li&gt;The duration of a subpass is limited to ttlMonitorSubPassTargetSecs. If there are outstanding deletions by the end of the subpass, a new subpass starts within the same pass.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Motivation:&lt;br/&gt;
Legacy behavior involves single iteration over each TTL index, with an unbounded of documents removed and time spent executing deletes on a TTL index. Thus, the TTL Monitor could spend unbounded time deleting expired documents on one TTL index while starving the others from deletes.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;DescriptionofLinkedTicket&quot;&gt;&lt;/a&gt;Description of Linked Ticket&lt;/h2&gt;
&lt;p&gt;    The single-threaded TTL Monitor can get &quot;stuck&quot; deleting large ranges of documents on specific collections or databases. &lt;/p&gt;

&lt;p&gt;This prevents the TTL monitor from performing deletes on higher-priority collections such as config.system.sessions.&lt;/p&gt;

&lt;p&gt;We should consider imposing configurable per-database and per-collection document deletion limits. In addition, we will need to consider significantly lowering the default TTL pass interval (from 60 seconds) to ensure we make progress.&lt;/p&gt;

&lt;p&gt;Some hypothetical limits would be:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Maximum 10000 documents per database&lt;/li&gt;
	&lt;li&gt;Maximum 1000 documents per collection&lt;/li&gt;
	&lt;li&gt;Run TTL monitor every 5 seconds.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Also consider prioritizing important collections like config.system.sessions.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="2056594">DOCS-15365</key>
            <summary>Investigate changes in SERVER-56194: Make TTL deletes fair</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="backlog-server-pm">Backlog - Core Eng Program Management Team</reporter>
                        <labels>
                            <label>backlog</label>
                            <label>feature</label>
                            <label>replication</label>
                            <label>server-docs-bug-bash</label>
                    </labels>
                <created>Fri, 27 May 2022 10:00:33 +0000</created>
                <updated>Mon, 22 Jan 2024 15:45:59 +0000</updated>
                                            <version>6.0.0</version>
                                    <fixVersion>6.1.0-rc0</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4580704" author="edu.bot" created="Mon, 30 May 2022 08:36:52 +0000"  >&lt;p&gt;&lt;em&gt;Fix Version updated for upstream &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56194&quot; title=&quot;Make TTL deletes fair&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56194&quot;&gt;&lt;del&gt;SERVER-56194&lt;/del&gt;&lt;/a&gt;:&lt;/em&gt; &lt;br/&gt;
6.1.0-rc0&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                            <outwardlinks description="documents">
                                        <issuelink>
            <issuekey id="1683953">SERVER-56194</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>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 30 May 2022 08:36:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 36 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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Changes to serverStatus:&lt;br/&gt;
The TTL Monitor has a new ServerStatus field ttl.subPasses &lt;br/&gt;
&lt;br/&gt;
A given TTL pass may consist of 0 to many sub-passes. 0 only in the case the replica set is not in a readable state when the pass begins. &lt;br/&gt;
&lt;br/&gt;
The ServerStatus ttl.passes field remains the same in that a single pass deletes all expired documents (unless externally interrupted).&lt;br/&gt;
&lt;br/&gt;
Note: Behavior of the TTLMonitor only changes when server-parameter &amp;#39;ttlMonitorBatchDeletes&amp;#39; is set to true. Otherwise, the TTL Monitor uses legacy behavior and each TTL pass, provided the replica set is in a readable state, consists of a single sub-pass.&lt;br/&gt;
&lt;br/&gt;
New Behavior: &lt;br/&gt;
If the TTL monitor batches deletes (ttlMonitorBatchDeletes server param), then it provides fair TTL deletion as below.&lt;br/&gt;
- The TTL pass consists of zero, one or more subpasses.&lt;br/&gt;
- Each subpass deletes all expired documents on each TTL index in a round-robin fashion.&lt;br/&gt;
- The delete on each TTL index removes up to ttlIndexDeleteTargetDocs or runs up to ttlIndexDeleteTargetTimeMS, whichever happens first. The same TTL index can be queued up to be revisited in the same subpass if there are outstanding deletions.&lt;br/&gt;
- A TTL index is not visited any longer in a subpass once all documents are deleted.&lt;br/&gt;
- The duration of a subpass is limited to ttlMonitorSubPassTargetSecs. If there are outstanding deletions by the end of the subpass, a new subpass starts within the same pass.&lt;br/&gt;
&lt;br/&gt;
Motivation:&lt;br/&gt;
Legacy behavior involves single iteration over each TTL index, with an unbounded of documents removed and time spent executing deletes on a TTL index. Thus, the TTL Monitor could spend unbounded time deleting expired documents on one TTL index while starving the others from deletes.&lt;br/&gt;
</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-19446</customfieldvalue>
                        </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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 36 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-pm</customfieldvalue>
            <customfieldvalue>edu.bot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0wjk7:</customfieldvalue>

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

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