Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14492

Investigate changes in SERVER-56934: Improve collMod API for time-series expireAfterSeconds

      Description

      Downstream Change Summary

      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:

      Unknown macro: {timeField}

      , expireAfterSeconds: 10}

      When manually creating a time-series buckets collection, the `clusteredIndex` option now takes a boolean, rather than an object. i.e.

      Unknown macro: {create}

      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.

      Unknown macro: {collMod}

      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.)

            Assignee:
            naomi.pentrel@mongodb.com Naomi Pentrel (Inactive)
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 28 weeks, 6 days ago