Commit a303bde3 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Guard against data loss when snapshotting

As discussed in:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23508#note_123296899

Snapshotting doesn't use git, and will miss the required shared data.
parent 954f8728
......@@ -37,8 +37,6 @@ module ObjectPool
"object_pool:create:#{pool.id}"
end
private
def lease_timeout
1.hour
end
......
......@@ -118,6 +118,10 @@ module Geo
# will be enqueued by the log cursor, which should resolve any problems
# it is possible to fix.
def fetch_snapshot
# Snapshots will miss the data that are shared in object pools, and snapshotting should
# be avoided to guard against data loss.
return if project.pool_repository
log_info("Attempting to fetch repository via snapshot")
temp_repo.create_from_snapshot(
......
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