Enable `efficient_counter_attribute` feature flag
Problem to solve
Resolving bug #23327 (closed) requires multiple steps and this issue is for one of them to enable efficient_counter_attribute feature flag.
Intended users
User experience goal
Proposal
Enable efficient_counter_attribute feature flag and monitor it to confirm the CounterAttribute Rails concern is properly incrementing/decrementing build_artifacts_size.
What does success look like, and how can we measure that?
-
statistics for build artifacts size are updated correctly (with efficient counters there is up to 10 mins delay when the size is reflected in the database)
- Add multiple artifacts
- Remove multiple artifacts
- ensure the artifacts size matches the expectation
-
Monitor
FlushCounterIncrementsWorkerin Grafana to ensure it works fine and it's scheduled regularly. -
Redis usage to remain low - we need to ensure that we are not storing too much data and that
FlushCounterIncrementsWorkermoves data from Redis to the database regularly. -
Additionally we could check whether any of the statement timeout related to
project_statisticsandnamespace_statisticsupdates are reduced.
Further details
This issue is for step 2 in the following plan of action to fix artifact_size being broken (#23327 (closed)):
- Make
build_artifacts_sizeuse efficient counters - #238534 (closed) - Enable
efficient_counter_attributefeature flag and monitor it - #238535 (closed) - Fix decrement of
build_artifact_sizewhen artifacts are deleted when a pipeline is deleted - #23327 (closed) - Write a script that can forcefully recalculate all artifacts size - #238536 (closed)