hazelcast / hazelcast/hazelcast-nodejs-client

[TRACKING ISSUE] Remove listeners sync with the calling thread [API-1595]

Open
#1,016 1 comment 0 reactions 0 assignees View on GitHub
to-jira
Dominant language
TypeScript
Stars
152
Forks
64
Avg merge
46m
Merged PRs (30d)
3

Description

The tracking issue for the Java side PR.

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

---

It turns out that there are some services relying on the removal
of a listener on the member when listener is removed from the client.
Example:
Cache listener count is kept per proxy. When listener is removed,
we decrease the listener count from the cache context.
Since listener removal is async, it could be the case that the cache
is destroyed from the calling thread before we decrement the value.
In such cases, we decrement but the incremented value is lost. Therefore,
we can end up with negative values.

The listener derregistration invoctions are not waited. It was
sync but we have changed the behavior as a side affect during
this fix https://github.com/hazelcast/hazelcast/pull/17646

We may solve this only for CacheListener but there could be more
services relying on sync listener removal. Therefore, as a fix,
we wait for invocation answer from the remote.

fixes https://github.com/hazelcast/hazelcast/issues/19269

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.