-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add cluster_name property to avoid several clusters merging accidentally #36
Conversation
f79a987
to
35ee08a
Compare
35ee08a
to
63128f0
Compare
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.
As you suggested in the PR description, could you add an error message to the protocol?
As you mentioned it is nicer for testing, but also,I suspect a common problem that will occur is a misconfigured typo in the conf of one of the server. The user will likely investigate the log of the server that cannot connect to the cluster first and an explicit error message there might be nice.
I just pushed a commit introducing a I started writing the code with a more generic |
1318657
to
f99884c
Compare
This will make testing and operations easier, by explicitly refusing the message instead of silently dropping it.
f99884c
to
abefca0
Compare
|
Introduced in #4, this test has been outdated since the reception buffer sized has been increased to the full UDP MTU. As is, it sends an empty Syn message before sending another valid Syn message. The assert checks for an SynAck message, that is the response to the first packet instead of the second. Now that peers check the cluster name property of Syn messages, the first packet gets a BadCluster response, which fails the assert.
@xvello FYI: in tracing ?val will use Debug. %val will call Display. Alternatively, you can also try to get a &str and avoid any modifier. |
Thanks for the review. |
As described in quickwit-oss/quickwit#1260, we need a mechanism to ensure clusters do not accidentally merge when IPs are reused.
This PR:
cluster_name
argument when setting up the clusterSyn
messagesBadCluster
message typeSyn
message does not match the peer's cluster name, aBadCluster
message is returned instead of aSynAck
Additional notes