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

Refactor functions to obtain checkpoint list; Clear delete on skipping checkpoints

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.1, 5.1.0, 4.4.8, 5.0.2
    • Component/s: None
    • Labels:
      None

      Description

      This ticket tracks some of the work required after merging WT-7381 to refactor and clean up the code:

      Before WT-7381, we had one function to obtain a checkpoint list for a file: __wt_meta_ckptlist_get. This function would search for the metadata, and then pass the config to the helper routine __wt_meta_ckptlist_get_from_config to build a checkpoint list from reading the metadata.

      It is expensive to read metadata per file and parse metadata to build checkpoints each time we take a system checkpoint. With WT-7381 we started to maintain a cached checkpoint list. We still need to slow path (read from metadata) building the list, if the cached list is missing (or destroyed/invalidated because of certain operations).

      Code changes for WT-7381, introduced a new function, __wt_meta_saved_ckptlist_get, to obtain the cached list. To avoid code duplication the helper routine __wt_meta_ckptlist_get_from_config was broken down into smaller routines that both __wt_meta_ckptlist_get_from_config and __wt_meta_saved_ckptlist_get could call.

      This asks for a refactor, where the ideal would be to have a single function call to obtain the checkpoint list, as it existed before code changes from WT-7381, __wt_meta_ckptlist_get. This function could then decide to use the cached list if available, or fall back to creating the list from the metadata. The callers trying to obtain the checkpoint list, should not worry about where the list came from.

      Please look at this comment for further details.

        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:
                Resolved: