Skip to content

K8SPXC-1389: fix mysql connection leak#2409

Open
pooknull wants to merge 2 commits intomainfrom
K8SPXC-1389
Open

K8SPXC-1389: fix mysql connection leak#2409
pooknull wants to merge 2 commits intomainfrom
K8SPXC-1389

Conversation

@pooknull
Copy link
Copy Markdown
Contributor

@pooknull pooknull commented Mar 20, 2026

https://perconadev.atlassian.net/browse/K8SPXC-1389

DESCRIPTION

Problem:
When the operator fails to execute the ALTER USER query, it retries on the next reconcile. Each retry creates a new connection, eventually exhausting max_connections.

Cause:
updateUserPassExpirationPolicy method didn't close the connection.

Solution:
Close mysql connection in the updateUserPassExpirationPolicy method.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PXC version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/M 30-99 lines label Mar 20, 2026
@pooknull pooknull marked this pull request as ready for review March 27, 2026 12:08
@JNKPercona
Copy link
Copy Markdown
Collaborator

Test Name Result Time
auto-tuning-8-0 passed 00:20:28
allocator-8-0 passed 00:14:10
allocator-8-4 passed 00:13:42
backup-storage-tls-8-0 passed 00:22:47
cross-site-8-0 passed 00:37:05
custom-users-8-0 passed 00:12:57
demand-backup-cloud-8-0 passed 01:01:10
demand-backup-cloud-8-4 passed 01:01:51
demand-backup-cloud-pxb-8-0 passed 00:56:24
demand-backup-encrypted-with-tls-5-7 passed 00:48:00
demand-backup-encrypted-with-tls-8-0 passed 00:48:17
demand-backup-encrypted-with-tls-8-4 passed 00:48:50
demand-backup-encrypted-with-tls-pxb-5-7 passed 00:19:01
demand-backup-encrypted-with-tls-pxb-8-0 passed 00:18:04
demand-backup-encrypted-with-tls-pxb-8-4 passed 00:18:59
demand-backup-8-0 passed 00:45:50
demand-backup-flow-control-8-0 passed 00:10:46
demand-backup-flow-control-8-4 passed 00:11:17
demand-backup-parallel-8-0 passed 00:09:41
demand-backup-parallel-8-4 passed 00:10:21
demand-backup-without-passwords-8-0 passed 00:17:12
demand-backup-without-passwords-8-4 passed 00:17:47
extra-pvc-8-0 passed 00:25:54
haproxy-5-7 passed 00:15:29
haproxy-8-0 passed 00:15:27
haproxy-8-4 passed 00:15:46
init-deploy-5-7 passed 00:16:43
init-deploy-8-0 passed 00:18:37
limits-8-0 passed 00:12:46
monitoring-2-0-8-0 passed 00:23:33
monitoring-pmm3-8-0 passed 00:18:50
monitoring-pmm3-8-4 passed 00:18:59
one-pod-5-7 passed 00:14:53
one-pod-8-0 passed 00:13:53
pitr-8-0 passed 00:47:27
pitr-8-4 passed 00:47:33
pitr-pxb-8-0 passed 00:45:34
pitr-pxb-8-4 passed 00:47:18
pitr-gap-errors-8-0 passed 00:50:30
pitr-gap-errors-8-4 passed 00:50:51
proxy-protocol-8-0 passed 00:09:40
proxy-switch-8-0 passed 00:14:19
proxysql-sidecar-res-limits-8-0 passed 00:08:33
proxysql-scheduler-8-0 passed 00:28:47
pvc-resize-5-7 passed 00:18:18
pvc-resize-8-0 passed 00:17:24
recreate-8-0 passed 00:19:01
restore-to-encrypted-cluster-8-0 passed 00:26:56
restore-to-encrypted-cluster-8-4 passed 00:27:47
restore-to-encrypted-cluster-pxb-8-0 passed 00:16:49
restore-to-encrypted-cluster-pxb-8-4 passed 00:16:56
scaling-proxysql-8-0 passed 00:09:01
scaling-8-0 passed 00:11:26
scheduled-backup-5-7 passed 01:08:33
scheduled-backup-8-0 passed 01:06:04
scheduled-backup-8-4 passed 01:05:37
security-context-8-0 passed 00:26:41
smart-update1-8-0 passed 00:33:47
smart-update1-8-4 passed 00:33:34
smart-update2-8-0 passed 00:39:05
smart-update2-8-4 passed 00:38:59
smart-update3-8-0 passed 00:17:19
storage-8-0 passed 00:10:44
tls-issue-cert-manager-ref-8-0 passed 00:08:54
tls-issue-cert-manager-8-0 passed 00:10:55
tls-issue-self-8-0 passed 00:14:33
upgrade-consistency-8-0 passed 00:12:21
upgrade-consistency-8-4 passed 00:12:20
upgrade-haproxy-5-7 passed 00:26:26
upgrade-haproxy-8-0 passed 00:26:04
upgrade-proxysql-5-7 passed 00:16:55
upgrade-proxysql-8-0 passed 00:15:42
users-5-7 failure 00:00:49
users-8-0 failure 00:00:51
users-scheduler-8-4 failure 00:00:36
validation-hook-8-0 passed 00:01:36
Summary Value
Tests Run 76/76
Job Duration 04:14:22
Total Test Time 31:38:44

commit: b0dcc5e
image: perconalab/percona-xtradb-cluster-operator:PR-2409-b0dcc5e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M 30-99 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants