Inaccurate storage stats after project is imported

I created a new project and imported https://gitlab.com/gitlab-org/gitlab.git here. This is what I saw:

image

My application.log showed these entries:

2020-12-06T08:19:29.369Z: Updating statistics for project 238
2020-12-06T08:19:29.373Z: Updating statistics for project 238

I manually refreshed the storage statistics, and the total disk space went to 1.1 GB, which was accurate.

Maybe we need to:

  1. Force updating the storage statistics via project.statistics.update_storage_size
  2. Improve the logging to show which statistics were updated above