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

Cannot compact time series collection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: 6.0.2
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide
      > 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
      
      Show
      > 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
    • Execution Team 2022-12-12

      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.

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

              Created:
              Updated:
              Resolved: