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

Code cleanup: Introduce a is-part-of-ckpt-array field

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      The checkpoint list is maintained as an array of WT_CKPT. It is allocated/reallocated without always maintaining an allocation size. When freeing the array, we walk the list freeing individual checkpoints and terminate the walk at NULL ckpt->name, or ckpt->order fields. We do so because based on the order of initialization, one of these fields will always be populated, unless we have a failure while populating these fields themselves.

      This list termination is ending up prone to bugs and unnecessarily complicated and we can instead do better by introducing a field in WT_CKPT that reflects the end of the checkpoint list.

      Note: This became apparent as a review comment in WT-7381.

      Attachments

        Issue Links

          Activity

            People

              sulabh.mahajan@mongodb.com Sulabh Mahajan
              sulabh.mahajan@mongodb.com Sulabh Mahajan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: