Geo: Statement timeouts when counting lots of out of sync Wikis
We set resync_wiki
to t
to force a resync for all Wikis. The Geo tracking DB had a 90s statement timeout, so we saw this:
ActiveRecord::StatementInvalid: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
: SELECT COUNT(*) FROM "project_registry" WHERE "project_registry"."resync_wiki" = 'f' AND (NOT (EXISTS (SELECT 1 FROM "gitlab_secondary"."project_features" WHERE "gitlab_secondary"."project_features"."wiki_access_level" = 0 AND "gitlab_secondary"."project_features"."project_id" = "project_registry"."project_id")))
I've bumped the statement timeout to 5 minutes to compensate, but perhaps we need a better way.
/cc: @mkozono