[SERVER-11194] Non-numeric expiresAfterSeconds causes bad TTL query Created: 15/Oct/13  Updated: 11/Jul/16  Resolved: 24/Oct/13

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Querying
Affects Version/s: None
Fix Version/s: 2.4.9, 2.5.4

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Done Votes: 7
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   
Issue Status as of December 30th, 2013

ISSUE SUMMARY
TTL indexes remove all documents before the current date due to non-numeric types supplied to expiresAfterSeconds being interpreted as 0.

USER IMPACT
Users who supply a non-numeric value to expiresAfterSeconds could have data deleted.

SOLUTION
Mongod will produce an error for TTL indexes created with a non-numeric value for expiresAfterSeconds.

WORKAROUNDS
Users should ensure their application does not pass non-numeric values for expiresAfterSeconds.

PATCHES
Production release v2.4.9 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.

The query will delete everything before the current date as if the supplied expiresAfterSeconds was 0.



 Comments   
Comment by Githook User [ 21/Dec/13 ]

Author:

{u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}

Message: SERVER-11194 fix log message
Branch: v2.4
https://github.com/mongodb/mongo/commit/a8481e8f75464e5e570d415a00a98b6607d4cf54

Comment by Githook User [ 20/Dec/13 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-11194 ignore non-numeric expiresAfterSeconds on TTL indexes
Branch: v2.4
https://github.com/mongodb/mongo/commit/294234af4ec017aed633fe3292d1d3669cbb26a7

Comment by auto [ 24/Oct/13 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-11194 ignore non-numeric expiresAfterSeconds on TTL indexes
Branch: master
https://github.com/mongodb/mongo/commit/dc288a87a0e40eba11015a26e85659396ce9aea7

Generated at Thu Feb 08 03:25:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.