hazelcast / hazelcast-go-client

Hazelcast Go Client
https://hazelcast.com/clients/go
Apache License 2.0
193 stars 58 forks source link

[TRACKING ISSUE] Fire membership events when persistence enabled [API-1228] #548

Open hz-devops-test opened 3 years ago

hz-devops-test commented 3 years ago

The tracking issue for the Java side PR.

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


When persistence enabled, client does not fire membership events because members starts with same uuid's.

With this pr, we make sure that when cluster restarted, we always update the local memberlist with empty member list first. This way, we will be able to fire member removed/added events even if member uuid's does not change.

Note that if cluster uuid does not change, we will not fire any event. This happens client disconnected and connected back to the same cluster. Note that cluster uuid is not preserved on hotrestart with presistence.

There was already a test to verify this behaviour but it was working wrong. "ClientHotRestartTest extends ClientClusterRestartEventTest" In this pr, we make sure that the test uses same address for the restarted member to test this correctly.

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

github-actions[bot] commented 2 years ago

Internal Jira issue: API-1228