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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.1.0, 5.0.0-rc0
    • Component/s: manual, Server
    • Labels:
      None

      Description

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              backlog-server-pm Backlog - Core Eng Program Management Team
              Participants:
              Last commenter:
              Jeffrey Allen Jeffrey Allen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Days since reply:
                17 weeks, 1 day ago