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

TTL documentation is confusing

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: mongodb-2.4
    • Component/s: dochub
    • Labels:
      None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            roysmith Roy Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              10 years, 49 weeks, 3 days ago