Geo: Disable max allowed looks check for Geo counters
Summary
The gitlab-rake geo:status
rake task sometimes outputs a fallback number -1 for batch counters. One reason is known now: https://gitlab.com/gitlab-com/geo-customers/-/issues/147#note_1498175650, where the batch counter reaches an unwanted configuration.
When the minimum and maximum range divided by the default batch size (100.000 records) exceeds the maximum loops allowed (10.000), the counters return this fallback number. We should pass a larger batch size argument to pass this condition.
The batch size is not defined by Gitlab::Geo::BatchCounter
, so the Gitlab::Database::BatchCounter
default is used.
Increasing a batch size, let's say 10x, could cause query timeouts. We decided to add an optional parameter to disable/turning off the max loops check.