[SERVER-34670] TTL Deletes the record, but doesn't clear the indexs for the collection Created: 25/Apr/18  Updated: 08/Jun/18  Resolved: 14/May/18

Status: Closed
Project: Core Server
Component/s: TTL, WiredTiger
Affects Version/s: 3.4.13, 3.4.14
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Cyberwalker Assignee: Kelsey Schubert
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:
  • Disable TTL monitor so it doesn't delete the records.
  • Create a sample collection with TTL index.
  • import data
  • Get the collection size stats.
  • Enable TTL monitor
  • After TTL deletes are finished, get the collection stats.
  • The collection storage size is reduced, but the index size stays the same.
Participants:

 Description   

We have a collection with 200 milliion document which has an TTL index for 1 year.
The data in the collection is inserted daily around 5 gb a day. The past years data is getting deleted when the TTL deletes run.

But the index size on the collection is not getting reduce after TTL index deletion.



 Comments   
Comment by Kelsey Schubert [ 14/May/18 ]

Hi cyberwalk3r,

Thanks for the report. I suspect what you're seeing is the result of the WiredTiger not freeing the disk space to operating system. You may confirm that the keys were deleted by running the validate command. If you would like to return space to the OS, I would recommend either resyncing or running compact.

Kind regards,
Kelsey

Generated at Thu Feb 08 04:37:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.