Skip to content

Commit 40224f3

Browse files
authored
K8SPS-276: Remove semi-sync replication support (#398)
* K8SPS-276: Remove semi-sync replication support
1 parent 6e190e6 commit 40224f3

35 files changed

+70
-341
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
Based on our best practices for deployment and configuration, [Percona Operator for MySQL](https://www.percona.com/doc/kubernetes-operator-for-mysql/ps/index.html) contains everything you need to quickly and consistently deploy and scale MySQL instances in a Kubernetes-based environment on-premises or in the cloud. It provides the following capabilities:
1515

16-
* Deploy asynchronous and semi-sync replication MySQL clusters with Orchestrator on top of it
16+
* Deploy group replication MySQL clusters with MySQL Router
17+
* Deploy asynchronous replication MySQL clusters with Orchestrator and HAProxy
1718
* Expose clusters with regular Kubernetes Services
1819
* Monitor the cluster with [Percona Monitoring and Management](https://www.percona.com/software/database-tools/percona-monitoring-and-management)
1920
* Customize MySQL configuration

api/v1alpha1/perconaservermysql_types.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ func (t ClusterType) isValid() bool {
8585
}
8686

8787
type MySQLSpec struct {
88-
ClusterType ClusterType `json:"clusterType,omitempty"`
89-
SizeSemiSync intstr.IntOrString `json:"sizeSemiSync,omitempty"`
90-
SemiSyncType string `json:"semiSyncType,omitempty"`
91-
Expose ServiceExposeTogglable `json:"expose,omitempty"`
88+
ClusterType ClusterType `json:"clusterType,omitempty"`
89+
Expose ServiceExposeTogglable `json:"expose,omitempty"`
9290

9391
Sidecars []corev1.Container `json:"sidecars,omitempty"`
9492
SidecarVolumes []corev1.Volume `json:"sidecarVolumes,omitempty"`
@@ -453,10 +451,6 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi
453451
return errors.New("backup.image can't be empty")
454452
}
455453

456-
if cr.Spec.MySQL.Size != 0 && cr.Spec.MySQL.SizeSemiSync.IntVal >= cr.Spec.MySQL.Size {
457-
return errors.New("mysql.sizeSemiSync can't be greater than or equal to mysql.size")
458-
}
459-
460454
if cr.Spec.MySQL.StartupProbe.InitialDelaySeconds == 0 {
461455
cr.Spec.MySQL.StartupProbe.InitialDelaySeconds = 15
462456
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/orchestrator.conf.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@
5555
"SQLite3DataFile": "/var/lib/orchestrator/orc.db",
5656
"UnseenInstanceForgetHours": 1,
5757
"StatusEndpoint": "/api/status",
58-
"DetectSemiSyncEnforcedQuery": "select 1",
59-
"EnforceExactSemiSyncReplicas": true,
6058
"UseSuperReadOnly": true,
6159
"ReplicationLagQuery": "SELECT CAST((UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(ts)) AS UNSIGNED INTEGER) AS 'delay' FROM sys_operator.heartbeat ORDER BY ts DESC LIMIT 1",
6260
"FailMasterPromotionOnLagMinutes": 10
63-
}
61+
}

build/ps-entrypoint.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ create_default_cnf() {
160160
sed -i "/\[mysqld\]/a enforce-gtid-consistency=ON" $CFG
161161
sed -i "/\[mysqld\]/a log_error_verbosity=3" $CFG
162162
sed -i "/\[mysqld\]/a plugin-load-add=clone=mysql_clone.so" $CFG
163-
sed -i "/\[mysqld\]/a plugin-load-add=rpl_semi_sync_master=semisync_master.so" $CFG
164-
sed -i "/\[mysqld\]/a plugin-load-add=rpl_semi_sync_slave=semisync_slave.so" $CFG
165163

166164
if [[ -d ${TLS_DIR} ]]; then
167165
sed -i "/\[mysqld\]/a ssl_ca=${TLS_DIR}/ca.crt" $CFG

config/crd/bases/ps.percona.com_perconaservermysqls.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,8 +1665,6 @@ spec:
16651665
type: string
16661666
schedulerName:
16671667
type: string
1668-
semiSyncType:
1669-
type: string
16701668
serviceAccountName:
16711669
type: string
16721670
sidecarPVCs:
@@ -2872,6 +2870,19 @@ spec:
28722870
format: int32
28732871
type: integer
28742872
type: object
2873+
resizePolicy:
2874+
items:
2875+
properties:
2876+
resourceName:
2877+
type: string
2878+
restartPolicy:
2879+
type: string
2880+
required:
2881+
- resourceName
2882+
- restartPolicy
2883+
type: object
2884+
type: array
2885+
x-kubernetes-list-type: atomic
28752886
resources:
28762887
properties:
28772888
claims:
@@ -3093,11 +3104,6 @@ spec:
30933104
size:
30943105
format: int32
30953106
type: integer
3096-
sizeSemiSync:
3097-
anyOf:
3098-
- type: integer
3099-
- type: string
3100-
x-kubernetes-int-or-string: true
31013107
startupProbe:
31023108
properties:
31033109
exec:

config/samples/ps_v2_perconaserverformysql.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ spec:
99
mysql:
1010
clusterType: async
1111
size: 3
12-
sizeSemiSync: 0
1312
image: percona/percona-server:8.0.28
1413
resources:
1514
requests:

deploy/bundle.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,8 +3277,6 @@ spec:
32773277
type: string
32783278
schedulerName:
32793279
type: string
3280-
semiSyncType:
3281-
type: string
32823280
serviceAccountName:
32833281
type: string
32843282
sidecarPVCs:
@@ -4484,6 +4482,19 @@ spec:
44844482
format: int32
44854483
type: integer
44864484
type: object
4485+
resizePolicy:
4486+
items:
4487+
properties:
4488+
resourceName:
4489+
type: string
4490+
restartPolicy:
4491+
type: string
4492+
required:
4493+
- resourceName
4494+
- restartPolicy
4495+
type: object
4496+
type: array
4497+
x-kubernetes-list-type: atomic
44874498
resources:
44884499
properties:
44894500
claims:
@@ -4705,11 +4716,6 @@ spec:
47054716
size:
47064717
format: int32
47074718
type: integer
4708-
sizeSemiSync:
4709-
anyOf:
4710-
- type: integer
4711-
- type: string
4712-
x-kubernetes-int-or-string: true
47134719
startupProbe:
47144720
properties:
47154721
exec:

deploy/cr.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ spec:
3636
# initImage: percona/percona-server-mysql-operator:0.5.0
3737

3838
size: 3
39-
sizeSemiSync: 0
4039

4140
resources:
4241
requests:

deploy/crd.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,8 +3277,6 @@ spec:
32773277
type: string
32783278
schedulerName:
32793279
type: string
3280-
semiSyncType:
3281-
type: string
32823280
serviceAccountName:
32833281
type: string
32843282
sidecarPVCs:
@@ -4484,6 +4482,19 @@ spec:
44844482
format: int32
44854483
type: integer
44864484
type: object
4485+
resizePolicy:
4486+
items:
4487+
properties:
4488+
resourceName:
4489+
type: string
4490+
restartPolicy:
4491+
type: string
4492+
required:
4493+
- resourceName
4494+
- restartPolicy
4495+
type: object
4496+
type: array
4497+
x-kubernetes-list-type: atomic
44874498
resources:
44884499
properties:
44894500
claims:
@@ -4705,11 +4716,6 @@ spec:
47054716
size:
47064717
format: int32
47074718
type: integer
4708-
sizeSemiSync:
4709-
anyOf:
4710-
- type: integer
4711-
- type: string
4712-
x-kubernetes-int-or-string: true
47134719
startupProbe:
47144720
properties:
47154721
exec:

0 commit comments

Comments
 (0)