Commit 1508d8db authored by Stan Hu's avatar Stan Hu

Merge branch 'mk/geo/fix-noise-when-wiki-is-disabled' into 'master'

Prevent unnecessary, excessive updates

Closes #5432

See merge request gitlab-org/gitlab-ee!5119
parents 652a78c0 757586b3
......@@ -33,14 +33,15 @@ module Geo
return if registry.project.wiki_enabled?
registry.last_wiki_sync_failure = nil
registry.last_wiki_synced_at = DateTime.now
registry.last_wiki_successful_sync_at = DateTime.now
registry.resync_wiki = false
registry.wiki_retry_count = nil
registry.wiki_retry_at = nil
registry.force_to_redownload_wiki = false
if registry.changed?
if registry.changed? || registry.last_wiki_synced_at.nil? || registry.last_wiki_successful_sync_at.nil?
registry.last_wiki_synced_at = DateTime.now
registry.last_wiki_successful_sync_at = DateTime.now
success = registry.save
log_info("#{success ? 'Successfully marked' : 'Failed to mark'} disabled wiki as synced", registry_id: registry.id, project_id: registry.project_id)
end
......
---
title: Fix excessive updates to file_registry when wiki is disabled
merge_request: 5119
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment