Details
-
Task
-
Resolution: Gone away
-
Major - P3
-
None
-
None
Description
Description
For time-series collections, the `expireAfterSeconds` options is now specified as a part of the top-level collection options, rather than being nested inside the `timeseries` subobject. i.e.
{create: "coll", timeseries:
, expireAfterSeconds: 10}
When manually creating a time-series buckets collection, the `clusteredIndex` option now takes a boolean, rather than an object. i.e.
When using collMod to change the `expireAfterSeconds` of a time-series collection, `expireAfterSeconds` is now a top-level option and the previous `clusteredIndex` option has been removed. i.e.
Description of Linked Ticket
The API for specifying TTL on a time-series collection looks like this:
db.createCollection('ts', {timeseries: {timeField: 't', expireAfterSeconds: 3600}});
|
However, to change the "expireAfterSeconds" value, users have to specify a completely different "clusteredIndex" option:
db.runCommand({collMod: 'ts', clusteredIndex: {expireAfterSeconds: 10}})
|
This is confusing and we should make the API consistent between operations.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
Attachments
Issue Links
- documents
-
SERVER-56934 Improve collMod API for time-series expireAfterSeconds
-
- Closed
-