<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:43:06 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-80268] MongoDB TimeSeries Collection TTL Problem </title>
                <link>https://jira.mongodb.org/browse/SERVER-80268</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;&#160; &#160;I met a strange problem about the time series collection, i create a time series collection with expireAfterSeconds but what i found is when the time is come the record was not delete the same as all of the doc in the bucket was expire. I will attach the file and you can test it .&lt;/p&gt;</description>
                <environment></environment>
        <key id="2422152">SERVER-80268</key>
            <summary>MongoDB TimeSeries Collection TTL Problem </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="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="rhea.thorne@mongodb.com">Alison Rhea Thorne</assignee>
                                    <reporter username="aaa15942975658@163.com">zhijia zhang</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Aug 2023 14:12:42 +0000</created>
                <updated>Wed, 8 Nov 2023 16:11:37 +0000</updated>
                            <resolved>Wed, 8 Nov 2023 16:11:37 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5864647" author="JIRAUSER1274755" created="Wed, 8 Nov 2023 16:11:37 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for some time, so I&#8217;m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                            <comment id="5781401" author="JIRAUSER1274755" created="Mon, 16 Oct 2023 15:02:10 +0000"  >&lt;p&gt;We still need additional information to diagnose the problem. If this is still an issue for you, would you please confirm that the reproduction that we&apos;ve provided matches the behavior that you are seeing? Thank you!&lt;/p&gt;</comment>
                            <comment id="5737638" author="JIRAUSER1274755" created="Thu, 28 Sep 2023 14:29:35 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aaa15942975658%40163.com&quot; class=&quot;user-hover&quot; rel=&quot;aaa15942975658@163.com&quot;&gt;aaa15942975658@163.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I was able to replicate your reported behavior once making the adjustments that you noted. However, something I noticed is that within the data that you&#8217;ve provided, you have set the granularity for your Time Series collection to either minutes or hours depending on the dataset provided. Something that should be noted is that with a granularity of &#8220;hours&#8221; buckets can contain records with 30 days of separation. As such, can you clarify which granularity setting you have observed this behavior with? You can read more about these configurations here: &lt;a href=&quot;https://www.mongodb.com/docs/v5.0/core/timeseries/timeseries-automatic-removal/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Set up Automatic Removal for Time Series Collections (TTL)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the time being, we continued replication attempts following your initial dataset set to &#8220;minutes&#8221;. Using a document generator filled with random timestamps between 2-3 days before the current timestamp, the given records are indeed removed as expected. However, when the generator is set to generate records just over or under 24 hours the reported behavior is observed.&lt;/p&gt;

&lt;p&gt;We&#8217;ve attached an updated reproduction script to the ticket, can you confirm that the behavior that you&#8217;ve observed is replicated within said script? Once this is done, we can move forward with this ticket.&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br/&gt;
Rhea&lt;/p&gt;</comment>
                            <comment id="5703203" author="JIRAUSER1269210" created="Thu, 14 Sep 2023 08:43:14 +0000"  >&lt;p&gt;Hello, the reason why you did not find the problem when performing a replication is because it has been a long time.&lt;/p&gt;

&lt;p&gt;you can use the attachment but change the timestamp as current timestamp&#12290;&#160;&lt;/p&gt;

&lt;p&gt;exp&#65306;&lt;/p&gt;

&lt;p&gt;first create a timeseies collection use the follow command&#65306;&lt;/p&gt;

&lt;p&gt;db.createCollection(&lt;br/&gt;
&#160; &#160; &quot;weather24h1&quot;,&lt;br/&gt;
&#160; &#160; {&lt;br/&gt;
&#160; &#160; &#160; &#160;timeseries: &lt;/p&gt;
{
&#160; &#160; &#160; &#160; &#160; timeField: &quot;timestamp&quot;,
&#160; &#160; &#160; &#160; &#160; metaField: &quot;metadata&quot;,
&#160; &#160; &#160; &#160; &#160; granularity: &quot;hours&quot;
&#160; &#160; &#160; &#160;}
&lt;p&gt;,&lt;br/&gt;
&#160; &#160; &#160; &#160;expireAfterSeconds: 86400&lt;br/&gt;
&#160; &#160; }&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;second if the current date was ISODate(&quot;2023-08-21T14:11:35.930Z&quot;) you can make data was&#160; ISODate(&quot;2023-08-20T11:00:00.000Z&quot;) and ISODate(&quot;2023-08-19T00:00:00.000Z&quot;) just like what i attach in the file&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;third you will see the problem&#160;&lt;/p&gt;</comment>
                            <comment id="5681352" author="JIRAUSER1274755" created="Tue, 5 Sep 2023 21:21:13 +0000"  >&lt;p&gt;Thank you for your report.&lt;/p&gt;

&lt;p&gt;Based on what you&apos;ve reported, it sounds like you are having issues with documents within a timeseries collection not being removed while on mongod version 5.0.18. We attempted to replicate this using the steps that you have provided, but have been unable to do so. In the versions tested (including the reported version 5.0.18) we have found that expired documents within a timeseries collection have been removed after 60 seconds as expected, if the configured timeframe has passed.&lt;/p&gt;

&lt;p&gt;If you have not done so, we recommend setting up a fresh mongod instance elsewhere and attempting to replicate this issue. We&apos;ve also gone ahead and provided a mongosh script (&#160;&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/479186/479186_populate_and_test.js&quot; title=&quot;populate_and_test.js attached to SERVER-80268&quot;&gt;populate_and_test.js&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; ) to test whether or not documents are being deleted as expected.&lt;/p&gt;

&lt;p&gt;One thing that we would like to note is that it&apos;s possible that the timeframe for expiry had not passed, or not enough time had been given for the database to remove the entries.&#160;&lt;/p&gt;

&lt;p&gt;In any case, we hope that this helps.&lt;/p&gt;</comment>
                            <comment id="5664945" author="JIRAUSER1269210" created="Tue, 29 Aug 2023 02:55:34 +0000"  >&lt;p&gt;my mongodb version was 5.0.18 community&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="2419677">SERVER-80180</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="470267" name="attach1" size="2128" author="aaa15942975658@163.com" created="Mon, 21 Aug 2023 14:12:02 +0000"/>
                            <attachment id="472113" name="jira_file.txt" size="2093" author="aaa15942975658@163.com" created="Tue, 29 Aug 2023 02:53:47 +0000"/>
                            <attachment id="479186" name="populate_and_test.js" size="1479" author="rhea.thorne@mongodb.com" created="Thu, 28 Sep 2023 14:28:25 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 5 Sep 2023 21:21:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 weeks 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>rhea.thorne@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 weeks 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>rhea.thorne@mongodb.com</customfieldvalue>
            <customfieldvalue>aaa15942975658@163.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2n3wf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i255aw:</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;you can see the &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/470267/470267_attach1&quot; title=&quot;attach1 attached to SERVER-80268&quot;&gt;attach1&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</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>
                                    <customfieldvalue><![CDATA[rhea.thorne@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2mq1r:</customfieldvalue>

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