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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.1 Required
    • Component/s: None
    • Labels:
      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

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

                Dates

                Created:
                Updated: