Don't release shared lock eagerly when writing IPs

What does this MR do and why?

Don't release shared lock eagerly when writing IPs

For PATs, we obtain a shared lock in Redis for a certain amount of time to not update last_used_ips too frequently, but this timeout never applies because by default the lease is released immediately each time the block executes, thus not throttling this code at all.

Changelog: fixed

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

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

Related to #569170

Merge request reports

Loading