Skip to content

Geo - Improve the performance of count methods in verifiable_replicator

What does this MR do and why?

This MR changes .count queries under the Geo::VerifiableReplicator concern in favor of ::Gitlab::Database::BatchCount.batch_count to improve the performance of those queries that could be expensive on large Gitlab instances.

Identified class methods using (*)_count:

  • checksummed_count
  • checksum_failed_count
  • checksum_total_count
  • verified_count
  • verification_total_count

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 #371813 (closed)

Edited by Javiera Tapia

Merge request reports