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

[tor-commits] [collector/master] Extend descriptorCutOff by 6 hours.



commit a87ce0d02f17603dad109b78dce0d1dba4ef1d7d
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Mar 9 12:17:39 2020 +0100

    Extend descriptorCutOff by 6 hours.
    
    Fixes #19828.
---
 CHANGELOG.md                                                        | 4 ++++
 .../metrics/collector/relaydescs/RelayDescriptorDownloader.java     | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa9bb16..9bbedc4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@
    - Simplify logging configuration.
    - Set default locale `US` and default time zone `UTC` at the
      beginning of the execution.
+   - Download missing server and extra-info descriptors that have been
+     published up to 30 hours ago: 24 hours for the maximum age of
+     descriptors to be referenced plus 6 hours for the time between
+     generating votes and processing a consensus.
 
 
 # Changes in version 1.14.1 - 2020-01-16
diff --git a/src/main/java/org/torproject/metrics/collector/relaydescs/RelayDescriptorDownloader.java b/src/main/java/org/torproject/metrics/collector/relaydescs/RelayDescriptorDownloader.java
index 7155caa..4e6e9f6 100644
--- a/src/main/java/org/torproject/metrics/collector/relaydescs/RelayDescriptorDownloader.java
+++ b/src/main/java/org/torproject/metrics/collector/relaydescs/RelayDescriptorDownloader.java
@@ -183,7 +183,9 @@ public class RelayDescriptorDownloader {
   /**
    * Cut-off time for missing server and extra-info descriptors, formatted
    * "yyyy-MM-dd HH:mm:ss". This time is initialized as the current system
-   * time minus 24 hours.
+   * time minus 30 hours (24 hours for the maximum age of descriptors to be
+   * referenced plus 6 hours for the time between generating votes and
+   * processing a consensus).
    */
   private String descriptorCutOff;
 
@@ -329,7 +331,7 @@ public class RelayDescriptorDownloader {
     long now = System.currentTimeMillis();
     this.currentValidAfter = format.format((now / (60L * 60L * 1000L))
         * (60L * 60L * 1000L));
-    this.descriptorCutOff = format.format(now - 24L * 60L * 60L * 1000L);
+    this.descriptorCutOff = format.format(now - 30L * 60L * 60L * 1000L);
     this.currentTimestamp = format.format(now);
     this.downloadAllDescriptorsCutOff = format.format(now
         - 23L * 60L * 60L * 1000L - 30L * 60L * 1000L);

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