hazelcast / hazelcast/hazelcast-python-client

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

Abierto
#643 1 comentario 0 reacciones 1 asignado Reclamado por @gbarnett-hz Ver en GitHub
Source: Internal to-jira
Lenguaje dominante
Python
Estrellas
116
Forks
78
Merge medio
10 d 22 h
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.