You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/06/07 11:12:10 UTC

[GitHub] [cassandra] smiklosovic commented on a diff in pull request #1662: CASSANDRA-17584

smiklosovic commented on code in PR #1662:
URL: https://github.com/apache/cassandra/pull/1662#discussion_r891085898


##########
src/java/org/apache/cassandra/db/virtual/GossipInfoTable.java:
##########
@@ -76,10 +89,10 @@ final class GossipInfoTable extends AbstractVirtualTable
     public DataSet data()
     {
         SimpleDataSet result = new SimpleDataSet(metadata());
-        for (Map.Entry<InetAddressAndPort, EndpointState> entry : Gossiper.instance.endpointStateMap.entrySet())
+        for (Map.Entry<InetAddressAndPort, EndpointState> entry : endpointStateMapSupplier.get().entrySet())
         {
             InetAddressAndPort endpoint = entry.getKey();
-            EndpointState localState = entry.getValue();
+            EndpointState localState = new EndpointState(entry.getValue());

Review Comment:
   @adelapena well, but imagine that this is used in production, then we get that map from the gossip. However, is not it true that by time I am populating the table, that value would change? This basically ensures that whatever happes in Gossiper, the table I am going to return basically captures one particular point in time.



-- 
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