Add lease to update project statistics row and log concurrent updates
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:
- Refactor existing code to call a counter update method with a lock in
ProjectStatistics
. - Wrap each attempt to update a project statistics with an exclusive lease lock.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #373595
Edited by Albert