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/10/18 08:47:11 UTC
[PR] CASSANDRA-18935 3.11 reflect transport state in rpc [cassandra]
smiklosovic opened a new pull request, #2817:
URL: https://github.com/apache/cassandra/pull/2817
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
Re: [PR] CASSANDRA-18935 3.11 reflect transport state in rpc [cassandra]
Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic closed pull request #2817: CASSANDRA-18935 3.11 reflect transport state in rpc
URL: https://github.com/apache/cassandra/pull/2817
--
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
Re: [PR] CASSANDRA-18935 3.11 reflect transport state in rpc [cassandra]
Posted by "Mmuzaf (via GitHub)" <gi...@apache.org>.
Mmuzaf commented on code in PR #2817:
URL: https://github.com/apache/cassandra/pull/2817#discussion_r1363659125
##########
src/java/org/apache/cassandra/service/CassandraDaemon.java:
##########
@@ -713,13 +710,22 @@ public void startNativeTransport()
if (nativeTransportService == null)
throw new IllegalStateException("setup() must be called first for CassandraDaemon");
+ // this iterates over a collection of servers and returns true if one of them is started
+ boolean alreadyRunning = nativeTransportService.isRunning();
+
+ // this might in practice start all servers which are not started yet
nativeTransportService.start();
+
+ // interact with gossip only in case if no server was started before to signal they are started now
+ if (!alreadyRunning)
+ StorageService.instance.setRpcReady(true);
}
public void stopNativeTransport()
{
if (nativeTransportService != null)
{
+ StorageService.instance.setRpcReady(false);
Review Comment:
Should we call `StorageService#shutdownClientServers` instead or at least remove `setRpcReady(false)` there?
--
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
Re: [PR] CASSANDRA-18935 3.11 reflect transport state in rpc [cassandra]
Posted by "Mmuzaf (via GitHub)" <gi...@apache.org>.
Mmuzaf commented on code in PR #2817:
URL: https://github.com/apache/cassandra/pull/2817#discussion_r1363659125
##########
src/java/org/apache/cassandra/service/CassandraDaemon.java:
##########
@@ -713,13 +710,22 @@ public void startNativeTransport()
if (nativeTransportService == null)
throw new IllegalStateException("setup() must be called first for CassandraDaemon");
+ // this iterates over a collection of servers and returns true if one of them is started
+ boolean alreadyRunning = nativeTransportService.isRunning();
+
+ // this might in practice start all servers which are not started yet
nativeTransportService.start();
+
+ // interact with gossip only in case if no server was started before to signal they are started now
+ if (!alreadyRunning)
+ StorageService.instance.setRpcReady(true);
}
public void stopNativeTransport()
{
if (nativeTransportService != null)
{
+ StorageService.instance.setRpcReady(false);
Review Comment:
Should we call `StorageService#shutdownClientServers` instead?
--
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