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

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.4.2
    • Component/s: WiredTiger
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Андрей Маклаков
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: