[SERVER-6304] TTL collections not honoring strict timeout Created: 05/Jul/12  Updated: 15/Aug/12  Resolved: 05/Jul/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.1.2
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Christian Amor Kvalheim Assignee: Stennie Steneker (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X 10.7.4


Issue Links:
Depends
Related
is related to DOCS-322 TTL collection background task for de... Closed
Operating System: OS X
Participants:

 Description   

use test2
db.test.ensureIndex(

{createdAt:1}

,

{expireAfterSeconds:1}

)
db.test.insert(

{createdAt:new Date()}

)
db.test.insert(

{createdAt:new Date()}

)
db.test.insert(

{createdAt:new Date()}

)

I keep seeing them in the collection even after 5 seconds and then suddenly all gone. I don't know if this is expected behavior or if the expireAfterSeconds is supposed to be a hard limit.



 Comments   
Comment by Stennie Steneker (Inactive) [ 05/Jul/12 ]

This is actually the expected result, but a note hasn't been added to the documentation yet.

The background task for deleting documents in TTL collections runs once a minute, so testing with a granularity shorter than 60 seconds isn't accurate.

Generated at Thu Feb 08 03:11:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.