* for the moment, remove the 'isFailing' check for peers who have failing tunnels
(we need a more sophisticated algorithm than the one in place for it to be effective) * fix for the profileOrganizer to work safely in the sim
This commit is contained in:
@ -54,13 +54,19 @@ public class IsFailingCalculator extends Calculator {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rate failedRate = profile.getTunnelHistory().getFailedRate().getRate(60*1000);
|
////
|
||||||
if (failedRate.getCurrentEventCount() >= 2) {
|
// the right way to behave would be to use some statistical
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
// analysis on the failure rate, and only mark the peer as failing
|
||||||
_log.debug("Peer " + profile.getPeer().toBase64()
|
// if their rate exceeded the expected rate (mean, median, stddev, etc)
|
||||||
+ " is failing because too many of their tunnels failed recently");
|
////
|
||||||
return true;
|
|
||||||
}
|
//Rate failedRate = profile.getTunnelHistory().getFailedRate().getRate(60*1000);
|
||||||
|
//if (failedRate.getCurrentEventCount() >= 2) {
|
||||||
|
// if (_log.shouldLog(Log.DEBUG))
|
||||||
|
// _log.debug("Peer " + profile.getPeer().toBase64()
|
||||||
|
// + " is failing because too many of their tunnels failed recently");
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -146,8 +146,8 @@ public class ProfileOrganizer {
|
|||||||
* Add the new profile, returning the old value (or null if no profile existed)
|
* Add the new profile, returning the old value (or null if no profile existed)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public PeerProfile addProfile(PeerProfile profile) {
|
public PeerProfile addProfile(PeerProfile profile) throws IllegalStateException {
|
||||||
if ( (profile == null) || (profile.getPeer() == null) || (_us.equals(profile.getPeer())) ) return null;
|
if ( (profile == null) || (profile.getPeer() == null) ) return null;
|
||||||
|
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("New profile created for " + profile.getPeer().toBase64());
|
_log.debug("New profile created for " + profile.getPeer().toBase64());
|
||||||
|
Reference in New Issue
Block a user