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
c26a6d23
Commit
c26a6d23
authored
Jan 14, 2021
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update verification section in Geo framework doc
parent
8038543a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
doc/development/geo/framework.md
doc/development/geo/framework.md
+24
-4
No files found.
doc/development/geo/framework.md
View file @
c26a6d23
...
...
@@ -279,17 +279,32 @@ For example, to add support for files referenced by a `Widget` model with a
unless
table_exists?
(
:widget_registry
)
ActiveRecord
::
Base
.
transaction
do
create_table
:widget_registry
,
id: :bigserial
,
force: :cascade
do
|
t
|
t
.
integer
:widget_id
,
null:
false
t
.
bigint
:widget_id
,
null:
false
t
.
datetime_with_timezone
:created_at
,
null:
false
t
.
datetime_with_timezone
:last_synced_at
t
.
datetime_with_timezone
:retry_at
t
.
datetime_with_timezone
:verified_at
t
.
datetime_with_timezone
:verification_started_at
t
.
datetime_with_timezone
:verification_retry_at
t
.
integer
:state
,
default:
0
,
null:
false
,
limit:
2
t
.
integer
:verification_state
,
default:
0
,
null:
false
,
limit:
2
t
.
integer
:retry_count
,
default:
0
,
limit:
2
t
.
datetime_with_timezone
:retry_at
t
.
datetime_with_timezone
:last_synced_at
t
.
datetime_with_timezone
:created_at
,
null:
false
t
.
integer
:verification_retry_count
,
default:
0
,
limit:
2
t
.
boolean
:checksum_mismatch
t
.
binary
:verification_checksum
t
.
binary
:verification_checksum_mismatched
t
.
string
:verification_failure
,
limit:
255
t
.
text
:last_sync_failure
t
.
index
:widget_id
,
name: :index_widget_registry_on_widget_id
,
unique:
true
t
.
index
:retry_at
t
.
index
:state
# To optimize performance of WidgetRegistry.verification_failed_batch
t
.
index
:verification_retry_at
,
name: :widget_registry_failed_verification
,
order:
"NULLS FIRST"
,
where:
"((state = 2) AND (verification_state = 3))"
# To optimize performance of WidgetRegistry.needs_verification_count
t
.
index
:verification_state
,
name: :widget_registry_needs_verification
,
where:
"((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))"
# To optimize performance of WidgetRegistry.verification_pending_batch
t
.
index
:verified_at
,
name: :widget_registry_pending_verification
,
order:
"NULLS FIRST"
,
where:
"((state = 2) AND (verification_state = 0))"
end
end
end
...
...
@@ -310,6 +325,10 @@ For example, to add support for files referenced by a `Widget` model with a
class
Geo::WidgetRegistry
<
Geo
::
BaseRegistry
include
Geo
::
ReplicableRegistry
# TODO: Include VerificationState in VerifiableRegistry
# https://gitlab.com/gitlab-org/gitlab/-/issues/298811
include
::
Gitlab
::
Geo
::
VerificationState
include
::
Geo
::
VerifiableRegistry
MODEL_CLASS
=
::
Widget
MODEL_FOREIGN_KEY
=
:widget_id
...
...
@@ -366,6 +385,7 @@ For example, to add support for files referenced by a `Widget` model with a
end
include_examples
'a Geo framework registry'
include_examples
'a Geo verifiable registry'
describe
'.find_registry_differences'
do
...
# To be implemented
...
...
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