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

Improve logging at compact end

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Storage Execution
    • Fully Compatible
    • Execution Team 2023-03-06

    Description

      On finalizing a collection (and indices) compact call, the amount of freed space is logged here.

      It is possible for compact to actually cause the file size to grow instead of shrink, if there is little free space. This is because compacts also cause checkpoints to happen, which need to grow the file. If the compact operation results in no space reduction, and the checkpoint causes the file to grow, we will have a situation where pre-compact size is smaller than post-compact one.

      Size diff is computed as an unsigned long, so this results in an underflow and a very large number of freed bytes being reported.

      For instance, this can be observed in all runs of compact.js:

      [fsm_workload_test:compact] Fixture status:
      ...
      [j0] | 2023-02-03T03:45:28.578-05:00 I  STORAGE  20286   [conn850] "Compact end","attr":{"namespace":"test28_fsmdb0.compact_1","freedBytes":18446744073709441024}...

       

      Attachments

        Activity

          People

            yujin.kang@mongodb.com Yujin Kang Park
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: