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

WiredTiger compact command does not compact data when it does not meet the compact condition

    • Type: Icon: Question Question
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.2
    • Component/s: WiredTiger
    • None

      We run MongoDB 4.4.2 in RS to store about 13Tb of data, and in case of deleting some unused datasets from collections we need to reclaim disk space.

      For this option we use compact() functionality, but it doesn't work as expect.

      wiredTiger["block-manager"]["file bytes available for reuse"]
      19963424768

      but

      db.runCommand({ compact: 'my_collection'})
      {
       "bytesFreed" : 315392,
       "ok" : 1,
       "$clusterTime" : {
       "clusterTime" : Timestamp(1612200831, 1256),
       "signature" : {
       "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
       "keyId" : NumberLong(0)
       }
       },
       "operationTime" : Timestamp(1612200082, 1373)
      }

       

      and no extra space on disk.

      Any ideas?

       

            Assignee:
            dmitry.agranat@mongodb.com Dmitry Agranat
            Reporter:
            maklakov.andrew@gmail.com Андрей Маклаков
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: