[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/master] Warn if we're about to reset guard/middle/exit weights.



commit d44f92ea483339ff09c61491e18009bc6802d615
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Sat Dec 1 06:30:15 2012 +0100

    Warn if we're about to reset guard/middle/exit weights.
    
    Running the hourly cronjob twice an hour leads to resetting
    guard/middle/exit weights, because we don't store Wxx weights anywhere.
    We usually don't run that cronjob more than once per hour, so should be
    fine to just add a warning.  Should prevent bugs like #7596 in the future,
    or at least make us aware of them before users have to tell us.
---
 src/org/torproject/onionoo/DetailDataWriter.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/org/torproject/onionoo/DetailDataWriter.java b/src/org/torproject/onionoo/DetailDataWriter.java
index e085617..bdc36e9 100644
--- a/src/org/torproject/onionoo/DetailDataWriter.java
+++ b/src/org/torproject/onionoo/DetailDataWriter.java
@@ -220,6 +220,11 @@ public class DetailDataWriter {
         wee = ((double) bandwidthWeights.get("Wee")) / 10000.0;
         wed = ((double) bandwidthWeights.get("Wed")) / 10000.0;
       }
+    } else {
+      System.err.println("Could not determine most recent Wxx parameter "
+          + "values, probably because we didn't parse a consensus in "
+          + "this execution.  All relays' guard/middle/exit weights are "
+          + "going to be 0.0.");
     }
     SortedMap<String, Double>
         advertisedBandwidths = new TreeMap<String, Double>(),

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits