Improve logging at compact end

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • Execution Team 2023-03-06
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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}...

       

            Assignee:
            Yujin Kang Park
            Reporter:
            Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: