Improve collMod API for time-series expireAfterSeconds

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.0.0-rc0, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.0
    • Execution Team 2021-05-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Gregory Noma
              Reporter:
              Louis Williams
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: