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

Scheduler for TTL index deletion windows

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Add the capability to schedule TTL index deletion, analogous to how we can schedule the cluster balancer.

      Use case: 9-5 systems that want to perform TTL deletion of old data outside of business hours to avoid additional performance overhead during busy periods.

      This can be approximated today by running a cron job to do something like the following, but it would be a nice-to-have in the database:

      • At start of TTL deletion window:

      db.runCommand({collMod: "collection-name",
                     index: {keyPattern: {ts:1},
                             expireAfterSeconds: <desired expiry age>}})

      • At end of TTL deletion window:

      db.runCommand({collMod: "collection-name",
                     index: {keyPattern: {ts:1},
                             expireAfterSeconds: <some very large value>}})

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jon.rangel Jon Rangel
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: