Skip to content

Geo: Fix metrics updates when secondary nodes are cached

Stan Hu requested to merge sh-fix-geo-issue-9000 into master

Due to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8802, Gitlab::Geo.secondary_nodes can return an Array instead of an ActiveRecord relation if the value is retrieved from the cache. Fix this by using each instead of find_each, since loading a few GeoNode records into memory shouldn't be a big deal.

Closes #9000 (closed)

Merge request reports