[SERVER-70679] Cannot compact time series collection Created: 18/Oct/22  Updated: 29/Oct/23  Resolved: 29/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.2
Fix Version/s: 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kevin Adistambha Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-15767 [Server] Investigate changes in SERVE... Closed
Related
is related to SERVER-81041 Fix time-series collection compact lo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

> show collections
ts                     [time-series]
system.buckets.ts

 
Compacting a time series view shows the expected error:

> db.runCommand({compact:'ts', force:true})
MongoServerError: can't compact a view

 
But compacting the underlying collection also fails:

> db.runCommand({compact:'system.buckets.ts', force:true})
MongoServerError: can't compact a system namespace

Sprint: Execution Team 2022-12-12
Participants:

 Description   

From the discussion in https://www.mongodb.com/community/forums/t/cant-compact-time-series-collection/194072

 I have over 100 GB of unused disk usage (and just 7GB used) in my time series collection that isn’t being reclaimed. I am unable to compact it.

Currently as far as I know we don't have a way to reclaim space in a time series collection other than dump and restore.



 Comments   
Comment by Githook User [ 29/Nov/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-70679 Allow compact to run against time-series collections
Branch: master
https://github.com/mongodb/mongo/commit/bd172b9f381c4a5650937a64a873945b6fbc416c

Generated at Thu Feb 08 06:16:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.