Skip to content

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

Open
@gbarnett-hz

Description

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

Activity

self-assigned this
on Sep 4, 2023
added
to-jiraUse to create a placeholder Jira issue in Jira APIs Project
on Sep 4, 2023
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] on Sep 4, 2023
github-actions

github-actions commented on Sep 4, 2023

@github-actions

Internal Jira issue: API-2129

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

Metadata

Assignees

Labels

Source: Internalto-jiraUse to create a placeholder Jira issue in Jira APIs Project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Potential memory leak: lock not removed from proxies when the lock is destroyed [API-2129] · Issue #643 · hazelcast/hazelcast-python-client