Skip to content

Fix group sidebar counts when Geo is enabled

Heinrich Lee Yu requested to merge 498901-move-timeout-transaction into master

What does this MR do and why?

This is a follow-up to !169391 (merged)

When Geo is enabled, Gitlab::Cache#delete inserts a record to the DB. This leads to an exception because we wrapped the count code in a transaction that only allows read queries.

See https://new-sentry.gitlab.net/organizations/gitlab/issues/1091415/?project=18&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=1h&stream_index=0

This moves the transaction so that it only wraps around the #uncached_count method.

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.

Related to #498901

Edited by Heinrich Lee Yu

Merge request reports

Loading