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

Port over cluster pubsub, test provider and gossip heartbeat eviction from .net #599 #639 #783

Merged
merged 14 commits into from
Jan 21, 2023

Conversation

Kunduin
Copy link
Contributor

@Kunduin Kunduin commented Jan 21, 2023

❤️❤️❤️ This is a very big pr.

I know it is better not to submit so much code at once, but because cluster pubsub is very complicated so I decided to submit it after all the test cases are passed. Although I have tried to keep the same project structure and naming as .net as much as possible, there are still many interfaces that are not as natural as .net. I will respond to any comment as soon as possible and keep improving this pr. Hopefully this pr will help make the project better.

The cluster pubsub in this pr basically passes all the test cases that appear in the csharp version, the only test case that is missed is PubSubBatchingProducerTests.Can_handle_publish_timeouts. This is because the go version of cluster.Call does not return nil due to timeouts, while the .net version of cluster.requestAsync returns null on timeouts.

In order to test pubsub in the cluster, I also implemented Test Provider, gossip heartbeat eviction, gossip graceful left.

Again, sorry for so much code at once. I would be very happy if the maintainer would help to review this part of the code.

@CLAassistant
Copy link

CLAassistant commented Jan 21, 2023

CLA assistant check
All committers have signed the CLA.

@Kunduin Kunduin changed the title Port over cluster pubsub、test provider、and gossip heartbeat eviction from .net #599 #639 Port over cluster pubsub, test provider and gossip heartbeat eviction from .net #599 #639 Jan 21, 2023
@rogeralsing
Copy link
Collaborator

Seems to be missing some deps in the pubsub code:

=== Errors
Error: cluster/pubsub_producer.go:442:19: undefined: atomic.Bool
Error: cluster/pubsub_producer.go:508:21: undefined: atomic.Bool
Error: cluster/pubsub_producer.go:518:16: undefined: atomic.Bool
Error: cluster/pubsub_producer.go:583:18: undefined: atomic.Bool

@rogeralsing
Copy link
Collaborator

I'll merge and look into the error here :-)

@rogeralsing rogeralsing merged commit 4df7244 into asynkron:dev Jan 21, 2023
@Kunduin
Copy link
Contributor Author

Kunduin commented Jan 21, 2023

atomic.Bool seems to be a new feature of go1.19. It may be better to use atomic.int32 or something that go 1.18 support. It is my mistake not to checkout the feat version number 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants