[SERVER-35844] TTL index should be able to include _id field, why not ? Created: 27/Jun/18  Updated: 06/Dec/22  Resolved: 28/Jun/18

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

Type: Improvement Priority: Minor - P4
Reporter: Alex Leong Assignee: Backlog - Storage Execution Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-9305 Enabling adding expireAfterSeconds to... Closed
Related
Assigned Teams:
Storage Execution
Participants:

 Description   

I would like to suggest an improvement to MongoDB.

As we all know the _id field contains a timestamp of when the document was created.  Currently very often we have developers creating an explicit ts field say "createdOn", just because they wanted to use the TTL index to expire documents based on creation ts.

Wouldn't it be wonderful if TTL index can be specified for _id field, since all the information required for expiring documents are already there ?

Please let me know if you have any questions.  I also spoke to Kirby (Mongo U) and Muthu Chinnasamy about this at the MongoDB World 2018.

 

Thank you

 

Alex Leong



 Comments   
Comment by Asya Kamsky [ 28/Jun/18 ]

This seems like a duplicate of SERVER-9305 (or SERVER-6701 which was closed as dup of SERVER-9305).

Comment by Ramon Fernandez Marina [ 27/Jun/18 ]

Thanks aleong@indeed.com, putting this on the Query team's radar.

Regards,
Ramón.

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