Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit 8bd10fe

Browse files
committed
Keep mysql readonly after exit group unintentionally
Since mysql version >= 8.0.12, <= 8.0.15 changed default behavior to `ABORT_SERVER`. Which will shutdown the server after exit group unintentionally. It should better change server to `READ_ONLY` instead of exit. Future version MySQL also change this behavior back to `READ_ONLY` https://dev.mysql.com/doc/refman/8.0/en/group-replication-options.html#sysvar_group_replication_exit_state_action Signed-off-by: Alan Tang <alan.tang@lalamove.com>
1 parent c98210b commit 8bd10fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/resources/statefulsets/statefulset.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ func mysqlServerContainer(cluster *v1alpha1.Cluster, mysqlServerImage string, ro
172172
"--master-info-repository=TABLE",
173173
"--relay-log-info-repository=TABLE",
174174
"--transaction-write-set-extraction=XXHASH64",
175+
"--group-replication-exit-state-action=READ_ONLY",
175176
fmt.Sprintf("--relay-log=%s-${index}-relay-bin", cluster.Name),
176177
fmt.Sprintf("--report-host=\"%[1]s-${index}.%[1]s\"", cluster.Name),
177178
"--log-error-verbosity=3",

0 commit comments

Comments
 (0)