Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1533

TTL documentation is confusing

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • mongodb-2.4
    • dochub
    • None

    Description

      The docs page (http://docs.mongodb.org/manual/tutorial/expire-data/) doesn't state how the document deletion time is computed. By experimentation, it appears this is the time in the indexed field, PLUS the expireAfterSeconds value given to ensureIndex().

      Further confusing things is the choice of field name ("status") in the example. It would have been immediately clear if the example field was "creationTime".

      It's also not clear why you need both the creationTime field and the TTL. It seems like just having a field with the expiration time would have been simpler (or picked up the creation time from the ObjectId). I assume there's a good reason, but some discussion of the design decision here would be useful.

      Attachments

        Activity

          People

            zack.brown@10gen.com Zack Brown
            roysmith Roy Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 39 weeks, 1 day ago