Skip to content

Remove exclusive lock when updating statistics

Fabio Pitino requested to merge rm-exclusive-lock-counter-attribute into master

What does this MR do and why?

When updating statistics in the database we wrapped the operation with detect_race_on_record which used an exclusive lease on the model record to detect concurrent updates. We are not taking any actions around concurrent updates hence we should remove this exclusive lock since it caused FlushCounterIncrementsWorker to be greatly affected by Redis load.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After

How to set up and validate locally

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

Merge request reports

Loading