Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
14a5f73c
Commit
14a5f73c
authored
Aug 04, 2020
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add wait conditions for cluster size.
parent
100f0c96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
+3
-0
mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
+12
-4
No files found.
mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
View file @
14a5f73c
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*");
CREATE TABLE t1 (f1 INTEGER);
connection node_1;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
connection node_2;
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait = 0;
connection node_2;
...
...
mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
View file @
14a5f73c
...
...
@@ -6,6 +6,8 @@
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
call
mtr
.
add_suppression
(
"WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg
\\
(
\\
).*"
);
CREATE
TABLE
t1
(
f1
INTEGER
);
# Force all nodes to become non-primary
...
...
@@ -13,13 +15,19 @@ CREATE TABLE t1 (f1 INTEGER);
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=1'
;
--
connection
node_2
SET
SESSION
wsrep_sync_wait
=
0
;
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
--
source
include
/
wait_condition
.
inc
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=1'
;
--
connect
node_3
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_3
--
connection
node_3
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=1'
;
SET
SESSION
wsrep_sync_wait
=
0
;
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
1
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
--
source
include
/
wait_condition
.
inc
--
sleep
10
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=1'
;
# Node #2 should be non-primary
SET
SESSION
wsrep_sync_wait
=
0
;
...
...
@@ -44,7 +52,7 @@ INSERT INTO t1 VALUES (1);
# Reconnect all nodes
--
connection
node_2
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=0'
;
--
sleep
10
--
source
include
/
wait_until_connected_again
.
inc
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
'Primary'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_status'
;
--
source
include
/
wait_condition
.
inc
...
...
@@ -67,7 +75,7 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
--
connection
node_3
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=0'
;
--
sleep
10
--
source
include
/
wait_until_connected_again
.
inc
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
'Primary'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_status'
;
--
source
include
/
wait_condition
.
inc
...
...
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