[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-db/master] Remember longer than 2 days that we stored a microdesc.
commit 965bb316468ecb6e1439af22e63353548fa11b37
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Fri Jan 24 11:18:39 2014 +0100
Remember longer than 2 days that we stored a microdesc.
Our internal descriptor completeness statistics just broke, because we
stopped remembering that we stored a microdesc more than 2 days ago. For
server descriptors and extra-info descriptors 2 days are sufficient,
because they won't be referenced in a consensus after that. But
microdescs may be used for a week or more. In fact, raise period to 40
days to be sure that we downloaded microdescs this month. This only
affects internal statistics, nothing else.
---
src/org/torproject/ernie/db/relaydescs/ArchiveWriter.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/org/torproject/ernie/db/relaydescs/ArchiveWriter.java b/src/org/torproject/ernie/db/relaydescs/ArchiveWriter.java
index a179f5b..b8e16f6 100644
--- a/src/org/torproject/ernie/db/relaydescs/ArchiveWriter.java
+++ b/src/org/torproject/ernie/db/relaydescs/ArchiveWriter.java
@@ -177,7 +177,7 @@ public class ArchiveWriter extends Thread {
break;
}
long validAfter = dateTimeFormat.parse(parts[0]).getTime();
- if (validAfter < this.now - 48L * 60L * 60L * 1000L) {
+ if (validAfter < this.now - 40L * 24L * 60L * 60L * 1000L) {
continue;
}
if (!this.storedMicrodescriptors.containsKey(validAfter)) {
@@ -514,9 +514,10 @@ public class ArchiveWriter extends Thread {
if (this.store(MICRODESCRIPTOR_ANNOTATION, data, outputFiles)) {
this.storedMicrodescriptorsCounter++;
}
- if (this.now - validAfter < 48L * 60L * 60L * 1000L) {
+ if (validAfter < this.now - 40L * 24L * 60L * 60L * 1000L) {
if (!this.storedMicrodescriptors.containsKey(validAfter)) {
- this.storedMicrodescriptors.put(validAfter, new HashSet<String>());
+ this.storedMicrodescriptors.put(validAfter,
+ new HashSet<String>());
}
this.storedMicrodescriptors.get(validAfter).add(
microdescriptorDigest);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits