Skip to content

Log only mode for new repository calculation methods

John Cai requested to merge jc-cat-file-repo-size-logging into master

The RepositorySize is a high risk API, since an inaccurate number (especially if it's much higher) can cause projects to be locked due to usage quotas. In order to safely roll out a new calculation, add a log only mode such that a feature flag has to be enabled in order to send the value back to the Rails client. Without this feature flag, we merely log the new calculation and continue to send the value calculated with du.

Also, change the cat-file calculation in use the %(objectsize:disk) formatting directive, which takes into account the way objects are compressed and the amount of space it actually takes up on the disk.

fixes: #4447 (closed)

Edited by John Cai

Merge request reports