Reuse Cassandra connections

Bug #1566946 reported by Petr Malik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Critical
Unassigned
Liberty
New
Undecided
Unassigned
Mitaka
Fix Committed
Undecided
Unassigned

Bug Description

Cassandra currently creates a new connection for every admin action and heartbeat check.

Connections are closed but there is apparently a resource leak in the engine causing the instance to run out of memory after some time resulting in the server getting killed by the kernel.

The guestagent should cache and reuse the connections in the Admin and Status objects.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/304316

Changed in trove:
status: New → In Progress
Changed in trove:
assignee: Petr Malik (pmalik) → Amrith (amrith)
Amrith Kumar (amrith)
Changed in trove:
milestone: none → newton-1
Changed in trove:
assignee: Amrith (amrith) → Petr Malik (pmalik)
Changed in trove:
assignee: Petr Malik (pmalik) → Amrith (amrith)
Amrith Kumar (amrith)
Changed in trove:
assignee: Amrith (amrith) → Petr Malik (pmalik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/313606

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (stable/mitaka)

Change abandoned by amrith (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/313606
Reason: need to cherry pick again

Changed in trove:
assignee: Petr Malik (pmalik) → Amrith (amrith)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/304316
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=728df1640f0db27fc541ad368341c98c1e77ef2c
Submitter: Jenkins
Branch: master

commit 728df1640f0db27fc541ad368341c98c1e77ef2c
Author: Petr Malik <email address hidden>
Date: Tue Apr 5 15:52:15 2016 -0400

    Reuse Cassandra connections

    Cache and reuse the connections in the Admin and
    Status objects to avoid leaking resources.
    Initialize the App and Admin objects themselves lazily
    at the first access.

    The Connection object has been changed to act as both
    an instance object and context manager.

    Change-Id: I4263b870a1099d345ab1940c61ccdf4680a706ca
    Closes-Bug: 1566946

Changed in trove:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (stable/mitaka)

Reviewed: https://review.openstack.org/313606
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=4175cb351fd8e3c9099fe592a434cd91dc847b1d
Submitter: Jenkins
Branch: stable/mitaka

commit 4175cb351fd8e3c9099fe592a434cd91dc847b1d
Author: Petr Malik <email address hidden>
Date: Tue Apr 5 15:52:15 2016 -0400

    Reuse Cassandra connections

    Cache and reuse the connections in the Admin and
    Status objects to avoid leaking resources.
    Initialize the App and Admin objects themselves lazily
    at the first access.

    The Connection object has been changed to act as both
    an instance object and context manager.

    Change-Id: I4263b870a1099d345ab1940c61ccdf4680a706ca
    Closes-Bug: 1566946
    (cherry picked from commit 728df1640f0db27fc541ad368341c98c1e77ef2c)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/trove 5.0.1

This issue was fixed in the openstack/trove 5.0.1 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/trove 6.0.0.0b2

This issue was fixed in the openstack/trove 6.0.0.0b2 development milestone.

Amrith Kumar (amrith)
Changed in trove:
assignee: Amrith Kumar (amrith) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.