-
Notifications
You must be signed in to change notification settings - Fork 561
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
chore(atomix): refactor cluster event test #4327
Conversation
😄 actually I created today a branch where I removed the DefaultEventService 😅 maybe we can discuss if we really want to keep it |
Yes. That module has some bugs now. But I like the general idea of it that we can subscribe to specific events and broadcast will only send to that specific receivers instead of sending to the whole cluster. |
Don't we use it for long polling? But I agree, it's knowingly buggy, so it's arguable if we want to keep it and fix it, or just get rid of it and use something else. EDIT: could we fix it instead? I remember refactoring it wasn't really hard, just a bit time consuming to write proper tests for the new version. |
I mean it is a just a buggy wrapper around the clusterCommunicationService. I was able to replace everything so 🤷 |
The behavior is different. In communicationService a broadcast send the message to all nodes in the cluster. But the eventService broadcast send the messages only to subscribers. |
Should we Zoom? 🚀 |
lets do it on monday |
Sending to only subscribers is useful in long polling notifications since only gateways are interested in those messages. Not sure how much overhead it has in a large cluster if every broker is broadcasting this to every other broker and gateways. The current issue in I think it is a useful abstraction and we should fix it and use it. Let's discuss it on monday. |
@deepthidevaki this is superseded by #4387 right? |
Replaced by #4387 |
Description
Refactor DefaultClusterEventTest to remove all thread.sleep() and introduce deterministic waiting.
Related issues
closes #4307
Pull Request Checklist
mvn clean install -DskipTests
locally before committing