mirror of https://github.com/apache/cassandra
Add option to disable use of severity in DynamicEndpointSnitch
patch by Jeremiah Jordan; reviewed by Aleksey Yeschenko for CASSANDRA-11737
This commit is contained in:
parent
aacd452630
commit
11d4e73e21
|
|
@ -1,4 +1,5 @@
|
|||
2.1.15
|
||||
* Add option to disable use of severity in DynamicEndpointSnitch (CASSANDRA-11737)
|
||||
* cqlsh COPY FROM fails for null values with non-prepared statements (CASSANDRA-11631)
|
||||
* Make cython optional in pylib/setup.py (CASSANDRA-11630)
|
||||
* Change order of directory searching for cassandra.in.sh to favor local one (CASSANDRA-11628)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ import com.yammer.metrics.stats.ExponentiallyDecayingSample;
|
|||
*/
|
||||
public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILatencySubscriber, DynamicEndpointSnitchMBean
|
||||
{
|
||||
private static final boolean USE_SEVERITY = !Boolean.getBoolean("cassandra.ignore_dynamic_snitch_severity");
|
||||
|
||||
private static final double ALPHA = 0.75; // set to 0.75 to make EDS more biased to towards the newer values
|
||||
private static final int WINDOW_SIZE = 100;
|
||||
|
||||
|
|
@ -279,7 +281,8 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa
|
|||
double score = entry.getValue().getSnapshot().getMedian() / maxLatency;
|
||||
// finally, add the severity without any weighting, since hosts scale this relative to their own load and the size of the task causing the severity.
|
||||
// "Severity" is basically a measure of compaction activity (CASSANDRA-3722).
|
||||
score += StorageService.instance.getSeverity(entry.getKey());
|
||||
if (USE_SEVERITY)
|
||||
score += StorageService.instance.getSeverity(entry.getKey());
|
||||
// lowest score (least amount of badness) wins.
|
||||
newScores.put(entry.getKey(), score);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue