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
Refactor cluster event service #4387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool 👍 much better I like it, just smaller things.
atomix/cluster/src/main/java/io/atomix/cluster/messaging/impl/DefaultClusterEventService.java
Show resolved
Hide resolved
atomix/cluster/src/main/java/io/atomix/cluster/messaging/impl/DefaultClusterEventService.java
Show resolved
Hide resolved
atomix/cluster/src/main/java/io/atomix/cluster/messaging/impl/DefaultClusterEventService.java
Outdated
Show resolved
Hide resolved
atomix/cluster/src/main/java/io/atomix/cluster/messaging/impl/DefaultClusterEventService.java
Outdated
Show resolved
Hide resolved
...x/cluster/src/test/java/io/atomix/cluster/messaging/impl/DefaultClusterEventServiceTest.java
Show resolved
Hide resolved
atomix/cluster/src/main/java/io/atomix/cluster/messaging/impl/DefaultClusterEventService.java
Outdated
Show resolved
Hide resolved
@Zelldon I found one issue with adding and removing local subscriptions. For every new subscription it was adding new handler to messaging service which might invoke the same subscribers multiple times for a single message. Similarly when closing we should unregister the handler when local subscribers are empty. I have fixed it and added more tests. Please have a look. |
Thanks @deepthidevaki. Cool that you found more issues. I think the thing with the multiple handler calls can't happen since internal a map is used, which just replaces the handler. Furthermore if I remove your changes only the test which verifies that the other subscription is called fails. But still I think both tests makes sense, so thanks for that. |
You are right. I mistook it for communication service where it keeps tracks of multiple handlers. |
* use member properties to propogate event subscription info instead of custom gossip
931101f
to
81636df
Compare
bors r+ |
4387: Refactor cluster event service r=deepthidevaki a=deepthidevaki ## Description * Use member properties to propagate subscription info instead of custom gossip * EventService can now only `broadcast`. Methods for unicast and send are removed from the interface. ## Related issues <!-- Which issues are closed by this PR or are related --> closes #4154 closes #4307 # Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
Build failed |
bors retry |
Build succeeded |
Description
broadcast
. Methods for unicast and send are removed from the interface.Related issues
closes #4154
closes #4307
Pull Request Checklist
mvn clean install -DskipTests
locally before committing