-
Type: Improvement
-
Resolution: Won't Do
-
Priority: 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.
- related to
-
SERVER-56194 Make TTL deletes fair
- Closed