diff options
author | jonmv <venstad@gmail.com> | 2023-08-31 13:46:04 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-08-31 13:46:04 +0200 |
commit | 862909b5a15767c633f9aebee24e8eb224d6e18b (patch) | |
tree | 5e386b8d00ed26c1e458ac6c1ae66143360f6118 /vespajlib/src | |
parent | 7590df35a54d0f7d2375be68efe5c82dbe71214d (diff) |
Reduce threshold from 1 to 0.95, and make deletion race less likely
Diffstat (limited to 'vespajlib/src')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java b/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java index 7fa591a88ba..cdd0e0c4ff7 100644 --- a/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java +++ b/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java @@ -108,7 +108,7 @@ public abstract class Maintainer implements Runnable { /** Convenience methods to convert attempts and failures into a success factor deviation from the baseline, and return */ protected final double asSuccessFactorDeviation(int attempts, int failures) { - double factor = attempts == 0 ? 1.0 : 1 - (double)failures / attempts; + double factor = attempts == 0 ? 1.0 : 1 - (double) failures / attempts; return new BigDecimal(factor - successFactorBaseline).setScale(2, RoundingMode.HALF_UP).doubleValue(); } |