[Feature flag] Roll out precise repository size calculations
What
Enable the :gitaly_revlist_for_repo_size
feature flag, which enables precise repository size calculations via git-rev-list(1). This allows us to account only for the objects that a repository is forced to carry and won't account for objects multiple times in case they are part of multiple packfiles.
Owners
- Team: Gitaly
- Most appropriate slack channel to reach out to:
#g_create_gitaly
- Best individual to reach out to: pks-t, jcaigitlab
Expectations
What release does this feature occur in first?
What are we expecting to happen?
The repository size will accurately be reflected and should only account for reachable objects. Unreachable objects or other unrelated files shouldn't be considered for the repository size anymore.
What might happen if this goes wrong?
The new implementation via git-rev-list(1) is significantly slower than the old one that simply used du(1). This can and has caused multiple incidents already, see e.g. gitlab-com/gl-infra/production#7284 (closed).
What can we monitor to detect problems with this?
Roll Out Steps
-
Enable on staging -
Is the required code deployed on staging? (howto) -
Enable on staging (howto) -
Add featureflagstaging to this issue (howto) -
Test on staging (howto) -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Enable on production -
Is the required code deployed on production? (howto) -
Enable on production in #production
(howto) -
Add featureflagproduction to this issue -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Default-enable the feature flag (optional, only required if backwards-compatibility concerns exist) -
Wait for release containg default-disabled feature flag. -
Change the feature flag to default-enabled (howto) -
Wait for release containing default-enabled feature flag.
-
-
Remove feature flag
Please refer to the documentation of feature flags for further information.