Add threshold to dynamic snitch

Details

Description

with CASSANDRA-1314, we'd like to have dynamic snitch route around slow/failing nodes but not messing with our "pinning" of ranges to nodes unless a threshold of badness is crossed. (Threshold should be optional since other snitches pure dynamic corresponds exactly to what we want.)

Brandon Williams
added a comment - 12/Oct/10 23:19 - edited It's more computationally intensive to do the badness calculation all the time, but I guess we can just check if it's greater than zero and eliminate the pinning.

after a closer look at the DES code I don't think it matches what the comments in the config file say. I think we need to actually pull the subsnitch value out so we know which one it's supposed to have affinity to, then see if the affinity'd score is over threshold larger than the other, and if so, override it.

Jonathan Ellis
added a comment - 13/Oct/10 14:06 after a closer look at the DES code I don't think it matches what the comments in the config file say. I think we need to actually pull the subsnitch value out so we know which one it's supposed to have affinity to, then see if the affinity'd score is over threshold larger than the other, and if so, override it.

1 would mean "use another replica when the pinned one is 100% worse than another". Zero means "use another replica when the pinned one is any amount worse than another", which we optimize to be the original behavior of "sort by score." I suppose we can allow values > 1, though I'm not sure how much sense it would make to use such a large value since phi isn't scaling linearly.

Brandon Williams
added a comment - 13/Oct/10 17:55 1 would mean "use another replica when the pinned one is 100% worse than another". Zero means "use another replica when the pinned one is any amount worse than another", which we optimize to be the original behavior of "sort by score." I suppose we can allow values > 1, though I'm not sure how much sense it would make to use such a large value since phi isn't scaling linearly.