Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow empty memberlist on cluster id changes [API-1215] (#20818) #21178

Merged

Conversation

sancar
Copy link
Contributor

@sancar sancar commented Apr 8, 2022

  • Dont allow empty memberlist on cluster id changes

When cluster id changed we were resetting member list
with an empty memberlist. It turned out that there are implementations
that assumes it will never be empty.

Following test failure is an example of it.
#20264

Instead of clearing the memberlist on cluster id change, we
are keeping the cluster id as part of the latest snapshot
to be able to fire correct events.

Note that clearing memberlist on cluster id change was
introduced as a fix to #18245
So it is important not to break related ClientHotRestartTest

fixes #20264

  • Refactor ClusterService to make it unittestable

Move getClient API out to reduce dependency to
HazelcastInstanceImpl

  • Refactor: ClusterService to be able to unittest

ClusterService does not depend on connection manager
and client anymore.

  • Add unittest for ClientClusterServiceImpl

Also revised the fix to cover blue/green case as well.
ClientClusterService will not serve empty memberlist even when
blue/green is happening.

(cherry picked from commit 4d6fc11)

Add method to ClientClusterService for enterprise tests (#21169)

(cherry picked from commit 1c769a2)

backport of #20818 and #21169

…ast#20818)

* Dont allow empty memberlist on cluster id changes

When cluster id changed we were resetting member list
with an empty memberlist. It turned out that there are implementations
that assumes it will never be empty.

Following test failure is an example of it.
hazelcast#20264

Instead of clearing the memberlist on cluster id change, we
are keeping the cluster id as part of the latest snapshot
to be able to fire correct events.

Note that clearing memberlist on cluster id change was
introduced as a fix to hazelcast#18245
So it is important not to break related ClientHotRestartTest

fixes hazelcast#20264

* Refactor ClusterService to make it unittestable

Move getClient API out to reduce dependency to
HazelcastInstanceImpl

* Refactor: ClusterService to be able to unittest

ClusterService does not depend on connection manager
and client anymore.

* Add unittest for ClientClusterServiceImpl

Also revised the fix to cover blue/green case as well.
ClientClusterService will not serve empty memberlist even when
blue/green is happening.

(cherry picked from commit 4d6fc11)

Add method to ClientClusterService for enterprise tests (hazelcast#21169)

(cherry picked from commit 1c769a2)
@sancar sancar added this to the 5.1.2 milestone Apr 8, 2022
@sancar sancar requested a review from a team as a code owner April 8, 2022 07:38
@sancar sancar self-assigned this Apr 8, 2022
@hz-devops-test
Copy link

The job Hazelcast-pr-EE-compiler of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] Failed to execute goal on project hazelcast-jet-cdc-debezium: Could not resolve dependencies for project com.hazelcast.jet:hazelcast-jet-cdc-debezium:jar:5.1.2-SNAPSHOT: Could not transfer artifact org.lz4:lz4-java:jar:1.8.0 from/to nexus-proxy (http://jenkins.hazelcast.com:8081/content/groups/public/): /home/jenkins/.m2/repository/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar.part (No such file or directory) -> [Help 1]
--------------------------

@sancar
Copy link
Contributor Author

sancar commented Apr 8, 2022

run-lab-run

@sancar
Copy link
Contributor Author

sancar commented Apr 11, 2022

run-ee-compile

@sancar sancar merged commit 8b696b2 into hazelcast:5.1.z Apr 12, 2022
@sancar sancar deleted the fix/emptyMemberListOnClusterChange/5.1.z branch April 12, 2022 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants