Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-123

Index TTL and GridFS: add an optional Time To Live on GridFS files

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • Planning
    • Affects Version/s: 1.4
    • Component/s: None

      In some cases we would like to add a time to live on files on GridFS.
      It can be achieved with index TTL.

      As discussed at FOSDEM 2014 with christkv, since GridFS stores its data in two collections, and since the TTL cleanup is not strictly executed right when the document expires; we probably should delay the deletion of the chunks to try to avoid having GridFS files without their chunks. The TTL cleanup delay has no upper bound though, so we should still expect some rare cases where it happens.

      However, I'm not sure how to expose this in the driver: it just works with custom fields in 'data', and custom index TTL on them. Maybe just add an example and a warning about the delay to add between the collections.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            trsystran Thomas Riccardi
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: