Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-12328

Stop compacting if a file has grown in size between passes

    • Storage Engines
    • 3
    • 2024-02-06 tapioooooooooooooca

      Background compact increases the chances of running compact on a table that has concurrent writer threads. This causes compact to get "stuck" on table for various reasons. We should stop compacting a table if it grows in size between compact passes as this indicates compact is unlikely able to reclaim space. During compaction the block manager is set to "first fit" mode so any concurrent writes should write towards the front of the file. If this is not possible, then it will write to the end of the file extending the file size. If this occurs, the compact thread is also unlikely able to rewrite any blocks in the first 90% and we should exit the compaction loop.

        1. background_compact_stress.txt
          1 kB
        2. wt-12328-fix.png
          wt-12328-fix.png
          77 kB
        3. wt-12328-no-fix.png
          wt-12328-no-fix.png
          73 kB

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            sean.watt@mongodb.com Sean Watt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: