Skip to content

Add commit graph rewriting support to housekeeping manager

For #5811 (closed)

In Add repacking support to transaction manager (!6616 - merged), We added the support for repacking housekeeping tasks. After running repacking, the commit-graphs should be updated. So, in the MR, the commit-graphs are updated as a part of the repacking housekeeping task. However, the housekeeping manager has various heuristics to determine if a repository's commit-graphs should be rewritten. The previous work only covers a portion of them, quite close but it doesn't match 100%.

The housekeeping in WAL must be fully compatible with the traditional transaction manager. We need to add a new housekeeping task for commit-graphs update. The scheduler should be the one who decides if the commit-graphs need to be updated. The manager can get rid of that logic and focus on the execution only.

This MR extracts commit-graphs rewriting support from the Repacking task to its own task. The outside housekeeping manager uses the heuristics and calls (*transaction).WriteCommitGraphs(...) to perform such task.

Edited by Quang-Minh Nguyen

Merge request reports