hazelcast / hazelcast/hazelcast-python-client

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

Ouverte
#643 1 commentaire 0 réactions 1 personne assignée Réclamée par @gbarnett-hz Voir sur GitHub
Source: Internal to-jira
Langage dominant
Python
Étoiles
116
Forks
78
Merge moyen
10 j 22 h
PR mergées (30 j)
1

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.

```python
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
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.