Open
Conversation
smiklosovic
commented
Nov 28, 2023
| # nodes that are alive | ||
| nodes[1].stop(wait=True, wait_other_notice=False) | ||
| nodes[1].update_startup_byteman_script(mk_bman_path('gossip_alive_callback_sleep.btm')) | ||
| nodes[1].stop(wait=True, wait_other_notice=True) |
Contributor
Author
There was a problem hiding this comment.
this is here to tell nodes which are still up that the second node went offline. Without that, it will still think that the second node is up.
smiklosovic
commented
Nov 28, 2023
| if cluster.version() < '5.1': | ||
| nodes[1].update_startup_byteman_script(mk_bman_path('gossip_alive_callback_sleep.btm')) | ||
|
|
||
| nodes[1].start(no_wait=True, wait_other_notice=False) |
Contributor
Author
There was a problem hiding this comment.
here we do not wait for other nodes to notice the second one is up, it will be detected on their own when the logic is correct. Until they see the second node JOINED after we started it, they will never select that on their own.
smiklosovic
commented
Nov 28, 2023
| METHOD findSuitableEndpoint | ||
| AT EXIT | ||
| BIND isthere:boolean = $localEndpoints.contains(org.apache.cassandra.locator.InetAddressAndPort.getByName("127.0.0.2")); | ||
| BIND isthere:boolean = $localReplicas.stream().anyMatch(r -> { try { return r.endpoint().equals(org.apache.cassandra.locator.InetAddressAndPort.getByName("127.0.0.2")); } catch (Throwable t) { return false; } }); |
Contributor
Author
There was a problem hiding this comment.
localEndpoints are called localReplicas in 4.0+ and it is a collection of Replicas, not InetAddress(WithPort)
d95e55f to
f6e5e87
Compare
f6e5e87 to
266222f
Compare
266222f to
9434d27
Compare
9434d27 to
cc1204e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.