Commit 924ce7ae authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'mk/fix-secondary-not-resyncing-repo-after-migrate-storage' into 'master'

Geo: Fix "Project/wiki/design repo not able to resync after storage move"

See merge request gitlab-org/gitlab!44172
parents 9a8494ad bccbd8ca
...@@ -48,6 +48,12 @@ module Geo ...@@ -48,6 +48,12 @@ module Geo
log_info("Trying to fetch #{type}") log_info("Trying to fetch #{type}")
clean_up_temporary_repository clean_up_temporary_repository
# TODO: Remove this as part of
# https://gitlab.com/gitlab-org/gitlab/-/issues/9803
# This line is a workaround to avoid broken project repos in Geo
# secondaries after migrating repos to a different storage.
repository.expire_exists_cache
if redownload? if redownload?
redownload_repository redownload_repository
@new_repository = true @new_repository = true
......
---
title: 'Geo: Fix "Project repo not able to resync after storage move"'
merge_request: 44172
author:
type: fixed
...@@ -407,7 +407,7 @@ RSpec.describe Geo::RepositorySyncService, :geo do ...@@ -407,7 +407,7 @@ RSpec.describe Geo::RepositorySyncService, :geo do
force_to_redownload_repository: true force_to_redownload_repository: true
) )
expect(project.repository).to receive(:expire_exists_cache).twice.and_call_original expect(project.repository).to receive(:expire_exists_cache).exactly(3).times.and_call_original
expect(subject).not_to receive(:fail_registry_sync!) expect(subject).not_to receive(:fail_registry_sync!)
subject.execute subject.execute
......
...@@ -233,7 +233,7 @@ RSpec.describe Geo::WikiSyncService, :geo do ...@@ -233,7 +233,7 @@ RSpec.describe Geo::WikiSyncService, :geo do
force_to_redownload_wiki: true force_to_redownload_wiki: true
) )
expect(project.wiki.repository).to receive(:expire_exists_cache).twice.and_call_original expect(project.wiki.repository).to receive(:expire_exists_cache).exactly(3).times.and_call_original
expect(subject).not_to receive(:fail_registry_sync!) expect(subject).not_to receive(:fail_registry_sync!)
subject.execute subject.execute
......
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