Skip to content

Split PartitionManager into a node and a storage manager

Sami Hiltunen requested to merge smh-split-storage-mgr into master

This MR splits PartitionManager into two types:

  • Node manager which manages the storages including initialization and tear down. It's the entry point into Gitaly's storage implementation, and provides access to storages by their name.
  • Storage manager, which is responsible for concerns of a single storage, including partition lifecycle and managing access to partitions.

The implementations are further split into two different packages to further decouple the layers. We also remove the PartitionManager as it is no longer used.

To keep the size of this MR more manageable, I've left many clean ups for later and focused only on the changes needed to do this. For example:

  • There are still reference to PartitionManager in some places. I'll later go through the code and remove all remaining references in comments and variable names.
  • There are also some misname fields in the storage manager that still refer to transaction manager. I'll similarly go through these and rename them later.
  • LogConsumerFactory doesn't have separate tests in the node manager. I've left these out as in reality it shouldn't need to take in a LogConsumerFactory to begin with. We'll later refactor this part. The existing tests of the WAL archiver cover this though.
  • We could rename the storage manager package, some of its files, and types.

That's a non-exhaustive list but the plan is to do further clean ups once this lands.

Merge request reports

Loading