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

Make TTL deletes prioritize internal collections

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution

      We've seen TTL unable to keep up with removing expired documents faster than new documents are inserted and expired. Part of this could be attributed to TTL deletes having to read the oldest data, which is often cold. Another issue is that many documents can expire at the same time causing a spike in TTL deletes. When either of these happens, internal collections like config.system.sessions can suffer by not getting an opportunity to remove expired sessions promptly. This can have downstream impacts like user operations failing due to TooManyLogicalSessions for example.

      I would only recommend doing this for v6.0 and earlier. This problem has gone away with SERVER-56194, where TTL will delete a subset of expired documents from each collection instead of all of them in a pass.

      Alternatively, we can backport SERVER-56194 but that was part of a project, so this might be a good middle ground.

            Assignee:
            Unassigned Unassigned
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: