Skip to content

Increment project statistics by individual job artifact

What does this MR do and why?

This MR builds on top of !104936 (merged).

We need to be able to track individual project statistics update so that we can handle concurrent statistics refresh and increments better.).

To do so, we need to change update to project statistics in DestroyBatchService and DestroyAssociationsService to decrement individual job artifact size, instead of a lump sum.

There are a few key changes in this merge request:

  1. Introduce ProjectStatistics.bulk_increment_statistic and respective bulk methods in BufferedCounter and LegacyCounter. On BufferedCounter, it sends all increments into Redis through a Redis pipeline to reduce the round trips to Redis.
  2. ProjectStatistics increment methods will not make any change if a project is pending deletion. When a project is going to be deleted, there is no need to increment any statistic, as it would be irrelevant after the project is deleted.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #373469

Edited by Albert

Merge request reports

Loading