Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11194

Non-numeric expiresAfterSeconds causes bad TTL query

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            scotthernandez Scott Hernandez
            Participants:
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: