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

Offen
#643 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@gbarnett-hz arbeitet bereits daran.

Seit 04.9.2023.

  • #644 von @gbarnett-hz — ohne Merge geschlossen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

Source: Internal to-jira

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
Vorherrschende Sprache
Python
Sterne
115
Forks
78
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus hazelcast/hazelcast-python-client

Alle Issues in hazelcast/hazelcast-python-client

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.