You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "smiklosovic (via GitHub)" <gi...@apache.org> on 2023/05/28 17:19:51 UTC
[GitHub] [cassandra] smiklosovic opened a new pull request, #2376: CASSANDRA-18543 4.0
smiklosovic opened a new pull request, #2376:
URL: https://github.com/apache/cassandra/pull/2376
Thanks for sending a pull request! Here are some tips if you're new here:
* Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
* Be sure to keep the PR description updated to reflect all changes.
* Write your PR title to summarize what this PR proposes.
* If possible, provide a concise example to reproduce the issue for a faster review.
* Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
* If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
Commit messages should follow the following format:
```
<One sentence description, usually Jira title or CHANGES.txt summary>
<Optional lengthier description (context on patch)>
patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>
```
The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2376: CASSANDRA-18543 4.0
Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2376:
URL: https://github.com/apache/cassandra/pull/2376#discussion_r1208608695
##########
src/java/org/apache/cassandra/gms/Gossiper.java:
##########
@@ -1299,14 +1304,39 @@ void notifyFailureDetector(InetAddressAndPort endpoint, EndpointState remoteEndp
private void markAlive(final InetAddressAndPort addr, final EndpointState localState)
{
+ if (inflightEcho.contains(addr))
+ {
+ return;
+ }
+ inflightEcho.add(addr);
+
localState.markDead();
Message<NoPayload> echoMessage = Message.out(ECHO_REQ, noPayload);
logger.trace("Sending ECHO_REQ to {}", addr);
- RequestCallback echoHandler = msg ->
+ RequestCallback echoHandler = new RequestCallback()
{
- // force processing of the echo response onto the gossip stage, as it comes in on the REQUEST_RESPONSE stage
- runInGossipStageBlocking(() -> realMarkAlive(addr, localState));
+ @Override
+ public void onResponse(Message msg)
+ {
+ // force processing of the echo response onto the gossip stage, as it comes in on the REQUEST_RESPONSE stage
+ runInGossipStageBlocking(() -> {
+ realMarkAlive(addr, localState);
+ inflightEcho.remove(addr);
Review Comment:
@grom358 what happens when `realMarkAlive` throws an exception? (it might happen if you check closely). Is it guaranteed that exception thrown in `realMarkAlive` will invoke `onFailure`?
How I understand it is that `onResponse` will be invoked when we have actual answer from other node, if we do not or there is a failure, `onFailure` is invoked. But does it mean that when we get a response and this method is called, when it fails, onFailure is invoked too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] smiklosovic closed pull request #2376: CASSANDRA-18543 4.0
Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic closed pull request #2376: CASSANDRA-18543 4.0
URL: https://github.com/apache/cassandra/pull/2376
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2376: CASSANDRA-18543 4.0
Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2376:
URL: https://github.com/apache/cassandra/pull/2376#discussion_r1208608695
##########
src/java/org/apache/cassandra/gms/Gossiper.java:
##########
@@ -1299,14 +1304,39 @@ void notifyFailureDetector(InetAddressAndPort endpoint, EndpointState remoteEndp
private void markAlive(final InetAddressAndPort addr, final EndpointState localState)
{
+ if (inflightEcho.contains(addr))
+ {
+ return;
+ }
+ inflightEcho.add(addr);
+
localState.markDead();
Message<NoPayload> echoMessage = Message.out(ECHO_REQ, noPayload);
logger.trace("Sending ECHO_REQ to {}", addr);
- RequestCallback echoHandler = msg ->
+ RequestCallback echoHandler = new RequestCallback()
{
- // force processing of the echo response onto the gossip stage, as it comes in on the REQUEST_RESPONSE stage
- runInGossipStageBlocking(() -> realMarkAlive(addr, localState));
+ @Override
+ public void onResponse(Message msg)
+ {
+ // force processing of the echo response onto the gossip stage, as it comes in on the REQUEST_RESPONSE stage
+ runInGossipStageBlocking(() -> {
+ realMarkAlive(addr, localState);
+ inflightEcho.remove(addr);
Review Comment:
@grom358 what happens when `realMarkAlive` throws an exception? (it might happen if you check closely). Is it guaranteed that exception thrown in `realMarkAlive` will invoke `onFailure`?
How I understand it is that `onResponse` will be invoked when we have acutal answer from other node, if we do not or there is a failure, `onFailure` is invoked. But does it mean that when we get a response and this method is called, when it fails, onFailure is invoked too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2376: CASSANDRA-18543 4.0
Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2376:
URL: https://github.com/apache/cassandra/pull/2376#discussion_r1208608770
##########
src/java/org/apache/cassandra/gms/Gossiper.java:
##########
@@ -2224,21 +2255,23 @@ public static void waitToSettle()
{
return;
}
- final int GOSSIP_SETTLE_MIN_WAIT_MS = 5000;
- final int GOSSIP_SETTLE_POLL_INTERVAL_MS = 1000;
- final int GOSSIP_SETTLE_POLL_SUCCESSES_REQUIRED = 3;
+ final int GOSSIP_SETTLE_MIN_WAIT_MS = Integer.getInteger("cassandra.gossip_settle_min_wait_ms", 5000);
Review Comment:
This should be moved to CassandraRelevantProperties
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org