Don't allow empty memberlist on cluster id changes [API-1215] (#20818) #21178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Move getClient API out to reduce dependency to
HazelcastInstanceImpl
ClusterService does not depend on connection manager
and client anymore.
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