Skip to content

Conversation

steve-nzr
Copy link
Contributor

@steve-nzr steve-nzr commented May 6, 2024

K8SPSMDB-1084 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:

We noticed an infinite increase, periodically, of opened connections count to our Mongod instances, on different clusters. It was really noticable on large sharded clusters (10 shards).

Cause:

Every backup, the operator left 1 connection open per ReplicaSet (per shard), in our case. So here for example : 11 connections per backup (10 shards + 1 ConfigServer).

Solution:

Disconnecting the client inside the psmb package after its use. I can't use defer since I'm in a loop, don't hesitate if you wan't to make it a new function instead.

Side note : This fix have been tested successfully in production since a few weeks now.

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?
  • 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 MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/XS 0-9 lines label May 6, 2024
@CLAassistant
Copy link

CLAassistant commented May 6, 2024

CLA assistant check
All committers have signed the CLA.

@egegunes egegunes self-assigned this May 6, 2024
@egegunes egegunes added this to the v1.16.0 milestone May 6, 2024
@JNKPercona
Copy link
Collaborator

Test name Status
arbiter passed
balancer passed
custom-replset-name passed
cross-site-sharded passed
data-at-rest-encryption passed
data-sharded passed
demand-backup passed
demand-backup-eks-credentials passed
demand-backup-physical passed
demand-backup-physical-sharded passed
demand-backup-sharded passed
expose-sharded passed
ignore-labels-annotations passed
init-deploy passed
finalizer passed
ldap passed
ldap-tls passed
limits passed
liveness passed
mongod-major-upgrade passed
mongod-major-upgrade-sharded passed
monitoring-2-0 passed
multi-cluster-service passed
non-voting passed
one-pod passed
operator-self-healing-chaos passed
pitr passed
pitr-sharded passed
pitr-physical passed
pvc-resize passed
recover-no-primary passed
rs-shard-migration passed
scaling passed
scheduled-backup passed
security-context passed
self-healing-chaos passed
service-per-pod passed
serviceless-external-nodes passed
smart-update passed
split-horizon passed
storage passed
tls-issue-cert-manager passed
upgrade passed
upgrade-consistency passed
upgrade-consistency-sharded-tls passed
upgrade-sharded passed
users passed
version-service passed
We run 48 out of 48

commit: e268e03
image: perconalab/percona-server-mongodb-operator:PR-1542-e268e038

@hors hors changed the title [Fix] MongoDB connections leak in backup feature K8SPSMDB-1084 MongoDB connections leak in backup feature May 7, 2024
@hors hors merged commit 83960cc into percona:main May 7, 2024
@hors
Copy link
Collaborator

hors commented May 7, 2024

@steve-nzr Thank you for your contribution. We will include it in the next release.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants