-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
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.