[SERVER-18311] Automatic collection dropping Created: 04/May/15  Updated: 06/Dec/22  Resolved: 19/Feb/19

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

Type: New Feature Priority: Major - P3
Reporter: Jon Rangel (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

MongoDB currently supports TTL indexes for removing old documents from a collection. There are some use cases where it would be useful to extend the concept of TTL behaviour to the collection as a whole.

A couple of examples:

  • Automatically dropping old collections when storing time series data using the schema advocated by our High Volume Data Feed reference architecture.
  • Automatically cleaning up temporary aggregation results created by aggregation pipelines with the $out operator. If each aggregation query outputs to a different temporary collection, the cached aggregation result is most efficiently cleaned up by simply dropping the collection.


 Comments   
Comment by Eric Milkie [ 19/Feb/19 ]

We believe this kind of logic is better suited to be in the application instead of the server.

Comment by Scott Hernandez (Inactive) [ 04/May/15 ]

Assuming this was implemented, how would it work? Can you provide examples of syntax and (unambiguous) usage?

This sounds like it delves into the realm of scheduled tasks or cron job land. Why should this be a database service, versus using existing application/system/etc features?

Also, if drop collection is done, where does one draw the line on the next feature request? Copy-collection-ttl, update-fields-ttl, shard-collection-ttl or whatever new variant related to time and values is requested...

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