Skip to content

repository: Define and implement new RepositoryInfo RPC

Over the last few releases, we have tried to adapt the RepositorySize RPC to encode the policy of what exactly repository size is. This has proven to not be a great design though: the definition of repository sizes is constantly changing and furthermore depends on the actual usecase at hand.

We have thus decided to change our approach: instead of providing a one-size-fits-all RPC in the form of RepositorySize, we instead provide an RPC call that provides more detailed information about a repository. Like this, callers can decide by themselves what the repository size should actually include.

This commit introduces the definitions for the new RepositoryInfo RPC call. Right now, it only includes the most important information:

- The total repository size.

- The number of loose references and size of the packed references
  file.

- The size of objects split up into different categories: recent,
  stale and kept.

This is sufficient in order to implement all the usecases in the context of repository size calculations that we know of right now, but may get extended in the future to include more information. Eventually, it can also be used to expose a dashboard that provides various bits of info to the administrator in order to increase visibility of the actual on-disk state.

Part of #4824 (closed).

Merge request reports