hazelcast / hazelcast/hazelcast-cpp-client

[TRACKING ISSUE] Release acquired FencedLock sessions before throwing

Open
#793 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
91
Forks
54
Avg merge
1d 12m
Merged PRs (30d)
5

Description

The tracking issue for the Java side PR.

**Release acquired FencedLock sessions before throwing**

See https://github.com/hazelcast/hazelcast/pull/17697 for details.

---

Even if the calls to the lock, lockInterruptibly or tryLock
(or other variants of these methods) fail for some reason other than
SessionExpiredException or WaitKeyCancelledException, we were not
releasing the sessions we acquired in the beginning, before throwing
the exception. This fix aims to solve this problem by catching all
kinds of exceptions (other than the two mentioned above), releasing
the session and then rethrowing the catched exception.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.