mirror of https://github.com/apache/cassandra
merge from 2.0
This commit is contained in:
commit
83ac8a631e
|
|
@ -2,6 +2,7 @@
|
|||
* (Windows) fix startup when WMI memory query fails (CASSANDRA-7505)
|
||||
* Anti-compaction proceeds if any part of the repair failed (CASANDRA-7521)
|
||||
Merged from 2.0:
|
||||
* Fix range merging when DES scores are zero (CASSANDRA-7535)
|
||||
* Warn when SSL certificates have expired (CASSANDRA-7528)
|
||||
* Fix error when doing reversed queries with static columns (CASSANDRA-7490)
|
||||
Merged from 1.2:
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa
|
|||
private int UPDATE_INTERVAL_IN_MS = DatabaseDescriptor.getDynamicUpdateInterval();
|
||||
private int RESET_INTERVAL_IN_MS = DatabaseDescriptor.getDynamicResetInterval();
|
||||
private double BADNESS_THRESHOLD = DatabaseDescriptor.getDynamicBadnessThreshold();
|
||||
|
||||
// the score for a merged set of endpoints must be this much worse than the score for separate endpoints to
|
||||
// warrant not merging two ranges into a single range
|
||||
private double RANGE_MERGING_PREFERENCE = 1.5;
|
||||
|
||||
private String mbeanName;
|
||||
private boolean registered = false;
|
||||
|
||||
|
|
@ -320,7 +325,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa
|
|||
if (maxMerged < 0 || maxL1 < 0 || maxL2 < 0)
|
||||
return true;
|
||||
|
||||
return maxMerged < maxL1 + maxL2;
|
||||
return maxMerged <= (maxL1 + maxL2) * RANGE_MERGING_PREFERENCE;
|
||||
}
|
||||
|
||||
// Return the max score for the endpoint in the provided list, or -1.0 if no node have a score.
|
||||
|
|
|
|||
Loading…
Reference in New Issue