Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential memory leak: lock not removed from proxies when the lock is destroyed [API-2129] #643

Open
gbarnett-hz opened this issue Sep 4, 2023 · 1 comment
Assignees
Labels
Source: Internal to-jira Use to create a placeholder Jira issue in Jira APIs Project

Comments

@gbarnett-hz
Copy link

gbarnett-hz commented Sep 4, 2023

Creating for visibility in case people think this is worth taking forward.

When you destroy a lock that lock is not removed CPProxyManager._lock_proxies resulting in a potential memory leak in long running clients that may otherwise destroy a number of locks. Obviously, usual caveats around such destruction.

lock = client.cp_subsystem.get_lock("my-distributed-lock").blocking()
fence = lock.lock()
try:
    # do something here
    pass
finally:
    lock.unlock()

lock.destroy() # <-- the lock proxy is not removed from internal proxy data structure
@gbarnett-hz gbarnett-hz self-assigned this Sep 4, 2023
@gbarnett-hz gbarnett-hz added the to-jira Use to create a placeholder Jira issue in Jira APIs Project label Sep 4, 2023
@github-actions github-actions bot changed the title Potential memory leak: lock not removed from proxies when the lock is destroyed Potential memory leak: lock not removed from proxies when the lock is destroyed [API-2129] Sep 4, 2023
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

Internal Jira issue: API-2129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal to-jira Use to create a placeholder Jira issue in Jira APIs Project
Projects
None yet
1 participant