1
0
Fork 0
Commit Graph

3 Commits

Author SHA1 Message Date
Jan d2b01a4c5e Bug fix 3.5/make ttl indexes behave like others (#9547)
* make TTL indexes behave like other indexes on creation

if a TTL index is already present on a collection, the previous behavior
was to make subsequent calls to `ensureIndex` fail unconditionally with
the error "there can only be one ttl index per collection".

now, we are comparing the attributes of the to-be-created index with the
attributes of the existing TTL index and make it only fail when the
attributes differ. if the attributes are identical, the `ensureIndex`
call succeeds and returns the existing index.

* added tests

* updated CHANGELOG
2019-07-23 15:46:50 +03:00
Jan d46acbb156
Bug fix/make ttl index work with datestrings too (#8208) 2019-02-22 16:09:51 +01:00
Jan 44c6a2d732
Feature/ttl index (#8169) 2019-02-19 14:12:21 +01:00