cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jolynch <...@git.apache.org>
Subject [GitHub] cassandra pull request #283: CASSANDRA-14459: DynamicEndpointSnitch should n...
Date Mon, 03 Dec 2018 08:14:18 GMT
Github user jolynch commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/283#discussion_r238172698
  
    --- Diff: src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java ---
    @@ -154,31 +326,203 @@ private void registerMBean()
     
         public void close()
         {
    -        updateSchedular.cancel(false);
    -        resetSchedular.cancel(false);
    +        if (updateScoresScheduler != null)
    +            updateScoresScheduler.cancel(false);
    +        if (updateSamplesScheduler != null)
    +            updateSamplesScheduler.cancel(false);
    --- End diff --
    
    Ok, I added a cancel+wait method to do this, and added in some synchronization around
`close`/`open` that I believe is is needed to ensure that this method works 100% of the time
during snitch updates.
    
    This actually fixes a bug I believe exists in trunk where we just hoped that we didn't
get an exception on Snitch construction in https://github.com/apache/cassandra/blob/f3609995c09570d523527d9bd0fd69c2bc65d986/src/java/org/apache/cassandra/service/StorageService.java#L4975-L4986


---

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


Mime
View raw message