This ticket tracks some of the work required after merging
WT-7381 to refactor and clean up the code:
Evaluate if we need to free the checkpoint list multiple times in __wt_checkpoint_close(). This came out of code review for
WT-7381, following the comment. Initially there were a couple more places the initial change followed the pattern:
The initial objective here was to clean the saved checkpoint list before checkpointing an individual file, and then clean after. The intention here was that as part of the system-wide checkpoint, a file slow paths by reading checkpoints from metadata, if that file was checkpointed outside the periodic system checkpointing.
Over the course of refining the change, __wt_checkpoint_close is the only place left with this pattern, and might not actually need clearing the saved list after the checkpoint, because it will likely be destroyed by a btree close. So we can likely get rid of that extra call to __wt_checkpoint_close().
Also, with a refactor of how we use the saved checkpoint list,
WT-7524, the usage became more widely available to all the callers of __wt_meta_ckptlist_get.
This ticket will try to find the calls to __wt_meta_saved_ckptlist_free() that are not needed anymore, and get rid of them.