Skip to content

Add lease to update project statistics row and log concurrent updates

Albert requested to merge 373595-lock-on-project-statistics-update into master

What does this MR do and why?

We need to be able to trace when there is potential concurrent update on a single project statistics row.

This MR makes the following changes:

  1. Refactor existing code to call a counter update method with a lock in ProjectStatistics.
  2. Wrap each attempt to update a project statistics with an exclusive lease lock.
  3. Log a warning each time it fails to obtain the lock and continue executing the update.

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 #373595

Edited by Albert

Merge request reports

Loading