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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage - Ra 2021-06-14, Storage - Ra 2021-07-26, Storage - Ra 2021-08-09

      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.

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

              Created:
              Updated:
              Resolved: