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
17bb757f
Commit
17bb757f
authored
Jan 14, 2022
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Fix undefined separate_verification_state_table?
Changelog: fixed EE: true
parent
15c73d5d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
313 additions
and
299 deletions
+313
-299
ee/app/models/concerns/geo/verifiable_model.rb
ee/app/models/concerns/geo/verifiable_model.rb
+0
-6
ee/app/models/concerns/geo/verification_state.rb
ee/app/models/concerns/geo/verification_state.rb
+6
-0
ee/spec/models/concerns/geo/verification_state_spec.rb
ee/spec/models/concerns/geo/verification_state_spec.rb
+307
-293
No files found.
ee/app/models/concerns/geo/verifiable_model.rb
View file @
17bb757f
...
@@ -53,12 +53,6 @@ module Geo
...
@@ -53,12 +53,6 @@ module Geo
.
primary_key_in
(
range
)
.
primary_key_in
(
range
)
.
pluck_primary_key
.
pluck_primary_key
end
end
# @return whether primary checksum data is stored in a table separate
# from the model table
def
separate_verification_state_table?
verification_state_table_name
!=
table_name
end
end
end
end
end
end
end
ee/app/models/concerns/geo/verification_state.rb
View file @
17bb757f
...
@@ -200,6 +200,12 @@ module Geo
...
@@ -200,6 +200,12 @@ module Geo
verification_state_table_class
.
arel_table
verification_state_table_class
.
arel_table
end
end
# @return whether primary checksum data is stored in a table separate
# from the model table
def
separate_verification_state_table?
verification_state_table_name
!=
table_name
end
def
verification_timed_out_batch_query
def
verification_timed_out_batch_query
return
verification_timed_out
unless
separate_verification_state_table?
return
verification_timed_out
unless
separate_verification_state_table?
...
...
ee/spec/models/concerns/geo/verification_state_spec.rb
View file @
17bb757f
...
@@ -8,6 +8,7 @@ RSpec.describe Geo::VerificationState do
...
@@ -8,6 +8,7 @@ RSpec.describe Geo::VerificationState do
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
context
'for Model classes'
do
context
'when verification state is stored in the model table'
do
context
'when verification state is stored in the model table'
do
before
(
:all
)
do
before
(
:all
)
do
create_dummy_model_table
create_dummy_model_table
...
@@ -451,4 +452,17 @@ RSpec.describe Geo::VerificationState do
...
@@ -451,4 +452,17 @@ RSpec.describe Geo::VerificationState do
end
end
end
end
end
end
end
context
'for registry classes'
do
describe
'.fail_verification_timeouts'
do
it
'sets verification state to failed'
do
state
=
create
(
:geo_package_file_registry
,
:synced
,
verification_started_at:
(
described_class
::
VERIFICATION_TIMEOUT
+
1
.
minute
).
ago
,
verification_state:
1
)
state
.
class
.
fail_verification_timeouts
expect
(
state
.
reload
.
verification_failed?
).
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