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
0065a254
Commit
0065a254
authored
Feb 01, 2018
by
Brett Walker
Committed by
Stan Hu
Feb 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Error 500 loading status of Geo primary node when replication lag is high"
parent
9562cd14
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
changelogs/unreleased-ee/4773-replication-slots-max-retained-wal-bytes-too-small.yml
...73-replication-slots-max-retained-wal-bytes-too-small.yml
+5
-0
db/migrate/20180201101405_change_geo_node_status_column_size.rb
...rate/20180201101405_change_geo_node_status_column_size.rb
+14
-0
db/schema.rb
db/schema.rb
+2
-2
spec/ee/spec/models/geo_node_status_spec.rb
spec/ee/spec/models/geo_node_status_spec.rb
+7
-0
No files found.
changelogs/unreleased-ee/4773-replication-slots-max-retained-wal-bytes-too-small.yml
0 → 100644
View file @
0065a254
---
title
:
Fix 500 errors caused by large replication slot wal retention
merge_request
:
4347
author
:
type
:
fixed
db/migrate/20180201101405_change_geo_node_status_column_size.rb
0 → 100644
View file @
0065a254
class
ChangeGeoNodeStatusColumnSize
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
def
up
change_column
:geo_node_statuses
,
:replication_slots_max_retained_wal_bytes
,
:integer
,
limit:
8
end
def
down
change_column
:geo_node_statuses
,
:replication_slots_max_retained_wal_bytes
,
:integer
,
limit:
4
end
end
db/schema.rb
View file @
0065a254
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20180
131104538
)
do
ActiveRecord
::
Schema
.
define
(
version:
20180
201101405
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -992,7 +992,7 @@ ActiveRecord::Schema.define(version: 20180131104538) do
t
.
string
"status_message"
t
.
integer
"replication_slots_count"
t
.
integer
"replication_slots_used_count"
t
.
integer
"replication_slots_max_retained_wal_bytes"
t
.
integer
"replication_slots_max_retained_wal_bytes"
,
limit:
8
t
.
integer
"wikis_count"
t
.
integer
"wikis_synced_count"
t
.
integer
"wikis_failed_count"
...
...
spec/ee/spec/models/geo_node_status_spec.rb
View file @
0065a254
...
...
@@ -379,6 +379,13 @@ describe GeoNodeStatus, :geo do
expect
(
subject
.
replication_slots_max_retained_wal_bytes
).
to
eq
(
2
.
megabytes
)
end
it
'handles large values'
do
stub_current_geo_node
(
primary
)
allow
(
primary
).
to
receive
(
:replication_slots_max_retained_wal_bytes
).
and_return
(
900
.
gigabytes
)
expect
(
subject
.
replication_slots_max_retained_wal_bytes
).
to
eq
(
900
.
gigabytes
)
end
end
describe
'#last_event_id and #last_event_date'
do
...
...
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