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

Fix mock connection management [HZ-836] #20371

Merged
merged 5 commits into from Jan 14, 2022

Conversation

ufukyilmaz
Copy link
Contributor

@ufukyilmaz ufukyilmaz commented Jan 13, 2022

This PR fixes the issues related to the hostname PR changes on the
mock connection manager. This caused the connections to the old members
not to be removed in the WAN tests which shutdowns and starts the cluster.
The main cause was that I changed (in the hostname PR) the used address
incorrectly in the place that we close the other side of connections (I was
mistakenly closing the connection on the same side again instead of the other
side.)
https://github.com/ufukyilmaz/hazelcast/blob/54013fe5f4fd2c48401fd3a229c6f47df59cd131/hazelcast/src/test/java/com/hazelcast/test/mocknetwork/MockServer.java#L364. I fixed that and then
cleaned up the code a bit.
Fixes: https://github.com/hazelcast/hazelcast-mono/issues/1617 and possibly
others

Octopus runs:
https://jenkins.hazelcast.com/job/Hazelcast-EE-octopus-pr-builder/510
https://jenkins.hazelcast.com/job/Hazelcast-EE-octopus-pr-builder/511 -> Similar test failures reported before in https://github.com/hazelcast/hazelcast-enterprise/issues/4270, https://github.com/hazelcast/hazelcast-enterprise/issues/4475)
http://jenkins.hazelcast.com/job/Hazelcast-EE-octopus-pr-builder/512/
Repeated runs of MapWanSyncAPITest: http://jenkins.hazelcast.com/job/ufuk-test-runner/52/console (200 min run no failure)

Checklist:

  • Labels (Team:, Type:, Source:, Module:) and Milestone set
  • Label Add to Release Notes or Not Release Notes content set
  • Request reviewers if possible

@hazelcast hazelcast deleted a comment from hz-devops-test Jan 13, 2022
@hazelcast hazelcast deleted a comment from hz-devops-test Jan 13, 2022
}

if (lifecycleListener != null) {
lifecycleListener.onConnectionClose(this, cause, false);
}

if (localNodeEngine != null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cleanup was already performed in onConnectionClose (MockServer#L354). But since the other side of the connection is not closed properly due to this error, this cleanup was not performed in the opposite side member.

@ufukyilmaz
Copy link
Contributor Author

run-lab-run

Copy link
Collaborator

@vbekiaris vbekiaris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ufukyilmaz kudos for cleaning up the mock server connections. I think the local/remote connection confusion is the reason why we got those test failures.

@vbekiaris vbekiaris merged commit f19e279 into hazelcast:master Jan 14, 2022
@AyberkSorgun AyberkSorgun changed the title Fix mock connection management Fix mock connection management [HZ-836] Jan 26, 2022
@ufukyilmaz ufukyilmaz deleted the fix-mock-connection-manager branch February 1, 2022 07:08
@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

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

4 participants