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

[v1.1.1] Handle Lost Invocations [API-992] #684

Merged
merged 10 commits into from
Nov 5, 2021

Conversation

yuce
Copy link
Collaborator

@yuce yuce commented Nov 2, 2021

  • Closes invocations when the corresponding connection is disconnected. When a connection is disconnected, the connection publishes a GroupLost event which contains the connection ID (group ID). and the reason of disconnection. Invocation service subscribes to that event, and closes matching invocations. The ConnectionClosed event is not used for this purpose in order to avoid depending on internal/cluster for the internal/invocation package which would result in cyclic dependency.
  • Changes user events to use the the global subscription ID.

@yuce yuce changed the title Handle Lost Invocation [v1.1.1] Handle Lost Invocation Nov 2, 2021
@yuce yuce added this to the 1.1.1 milestone Nov 2, 2021
@yuce yuce changed the title [v1.1.1] Handle Lost Invocation [v1.1.1] [WIP] Handle Lost Invocation Nov 2, 2021
@yuce yuce requested a review from sancar November 2, 2021 12:01
@yuce yuce changed the title [v1.1.1] [WIP] Handle Lost Invocation [v1.1.1] [WIP] Handle Lost Invocations Nov 2, 2021
@@ -47,6 +50,42 @@ func TestListenersAfterClientDisconnected(t *testing.T) {
})
}

func TestNotReceivedInvocation(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to avoid accessing internals and do a test from public API, you can send a long running task to the remote. An EntryProcessor for example which just sleeps. And then close the member.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wonder whether there is an entry processor you mentioned exists in the test jar. I'll try to find that.

@sancar
Copy link
Contributor

sancar commented Nov 4, 2021

Can we rename GroupID to ConnectionID ? We don't have a concept like group in other clients.

@yuce yuce changed the title [v1.1.1] [WIP] Handle Lost Invocations [v1.1.1] Handle Lost Invocations [API-992] Nov 5, 2021
@yuce yuce merged commit 82aca9e into hazelcast:master Nov 5, 2021
@yuce yuce deleted the handle-lost-invocation branch November 5, 2021 07:22
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.

2 participants