hazelcast / hazelcast/hazelcast-python-client

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

Aperta
#643 1 commento 0 reazioni 1 assegnatario Rivendicata da @gbarnett-hz Vedi su GitHub
Source: Internal to-jira
Lingua principale
Python
Stelle
116
Fork
78
Merge medio
10g 22h
PR unite (30g)
1

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.