Github user jolynch commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/283#discussion_r225362794
  
    --- Diff: src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java 
---
    @@ -210,8 +368,10 @@ public String getDatacenter(InetAddressAndPort 
endpoint)
     
             // TODO: avoid copy
             replicas = subsnitch.sortedByProximity(address, replicas);
    -        HashMap<InetAddressAndPort, Double> scores = this.scores; // Make 
sure the score don't change in the middle of the loop below
    -                                                           // (which 
wouldn't really matter here but its cleaner that way).
    +        // Make sure the score don't change in the middle of the loop below
    +        // (which wouldn't really matter here but its cleaner that way).
    +        final Map<InetAddressAndPort, Double> scores = this.scores;
    --- End diff --
    
    Yea I was somewhat surprised to see that too, I assumed there was a reason 
that it was final in `sortedByProximityWithBadness` and just made 
`sortedByProximityWithScores` consistent, but tbh I don't care and will switch 
to whichever way is better for you ;-)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to