Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
75b2166a
Commit
75b2166a
authored
Aug 26, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve sticky failures when attachments are missing on primary
parent
575bfa8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
ee/app/services/geo/file_download_service.rb
ee/app/services/geo/file_download_service.rb
+1
-1
ee/changelogs/unreleased/mk-resolve-sticky-failures-when-missing-on-primary.yml
...ed/mk-resolve-sticky-failures-when-missing-on-primary.yml
+5
-0
ee/spec/services/geo/file_download_service_spec.rb
ee/spec/services/geo/file_download_service_spec.rb
+20
-0
No files found.
ee/app/services/geo/file_download_service.rb
View file @
75b2166a
...
...
@@ -67,7 +67,7 @@ module Geo
if
retry_later
# We don't limit the amount of retries
registry
.
retry_count
=
(
registry
.
retry_count
||
0
)
+
1
registry
.
retry_at
=
Time
.
now
+
delay
(
registry
.
retry_count
).
seconds
registry
.
retry_at
=
next_retry_time
(
registry
.
retry_count
)
else
registry
.
retry_count
=
0
registry
.
retry_at
=
nil
...
...
ee/changelogs/unreleased/mk-resolve-sticky-failures-when-missing-on-primary.yml
0 → 100644
View file @
75b2166a
---
title
:
'
Geo:
Resolve
sticky
failures
when
attachments
are
missing
on
primary'
merge_request
:
6991
author
:
type
:
fixed
ee/spec/services/geo/file_download_service_spec.rb
View file @
75b2166a
...
...
@@ -220,6 +220,16 @@ describe Geo::FileDownloadService do
expect
(
registry_entry
.
retry_at
>
Time
.
now
).
to
be_truthy
end
end
it
'sets a retry date with a maximum of about 7 days'
do
registry_entry
.
update!
(
retry_count:
100
,
retry_at:
7
.
days
.
from_now
)
Timecop
.
freeze
do
execute!
expect
(
registry_entry
.
reload
.
retry_at
<
8
.
days
.
from_now
).
to
be_truthy
end
end
end
context
'when the file is not missing on the primary'
do
...
...
@@ -249,6 +259,16 @@ describe Geo::FileDownloadService do
expect
(
registry_entry
.
retry_at
>
Time
.
now
).
to
be_truthy
end
end
it
'sets a retry date with a maximum of about 7 days'
do
registry_entry
.
update!
(
retry_count:
100
,
retry_at:
7
.
days
.
from_now
)
Timecop
.
freeze
do
execute!
expect
(
registry_entry
.
reload
.
retry_at
<
8
.
days
.
from_now
).
to
be_truthy
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment