Address confusing error for clustered collections with TTL indexes meant for timeseries

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: TTL
    • Storage Execution
    • Fully Compatible
    • Storage Execution 2025-08-04
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Clustered collections support having an expireAfterSeconds option in the collection creation. However, specifying a large value can lead to it returning an error meant for time-series.

      > db.runCommand({create: "a", clusteredIndex: {key: {_id: 1}, unique: true}, expireAfterSeconds: 2000000000})
      
      MongoServerError[InvalidOptions]: TTL index 'expireAfterSeconds' option cannot exceed time since last epoch (1751636194s) for time-series collections, found 2000000000
      

      This error is confusing to the user since nothing related to timeseries can be found in the collection definition and in fact it's not even using anything related to them.

              Assignee:
              Haley Connelly
              Reporter:
              Jordi Olivares Provencio
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: