[DOCS-1533] TTL documentation is confusing Created: 21/May/13  Updated: 19/Aug/13  Resolved: 19/Aug/13

Status: Closed
Project: Documentation
Component/s: dochub
Affects Version/s: mongodb-2.4
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Roy Smith Assignee: Zack Brown
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 10 years, 39 weeks, 1 day ago

 Description   

The docs page (http://docs.mongodb.org/manual/tutorial/expire-data/) doesn't state how the document deletion time is computed. By experimentation, it appears this is the time in the indexed field, PLUS the expireAfterSeconds value given to ensureIndex().

Further confusing things is the choice of field name ("status") in the example. It would have been immediately clear if the example field was "creationTime".

It's also not clear why you need both the creationTime field and the TTL. It seems like just having a field with the expiration time would have been simpler (or picked up the creation time from the ObjectId). I assume there's a good reason, but some discussion of the design decision here would be useful.


Generated at Thu Feb 08 07:41:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.