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

[tor-commits] [onionoo/master] Avoid error because of non-existant descriptor type



commit c04a33a074a9815b0c146192b3b14225da15f7de
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Thu Jun 25 14:15:26 2015 +0200

    Avoid error because of non-existant descriptor type
    
    When splitting up the hourly updater into three phases, we lost the
    ability to skip downloading descriptors we're not going to process
    later.  Hence, we'll get an error because CollecTor doesn't serve
    bridge-pool assignments anymore.  But we don't parse them anyway, so
    we can as well remove them from our list of descriptors we might care
    about.  That avoids this specific error.
---
 .../org/torproject/onionoo/updater/DescriptorDownloader.java    |    3 ---
 .../java/org/torproject/onionoo/updater/DescriptorHistory.java  |    1 -
 .../java/org/torproject/onionoo/updater/DescriptorQueue.java    |    6 ------
 .../java/org/torproject/onionoo/updater/DescriptorSource.java   |    7 -------
 .../java/org/torproject/onionoo/updater/DescriptorType.java     |    1 -
 .../org/torproject/onionoo/updater/DummyDescriptorSource.java   |    1 -
 6 files changed, 19 deletions(-)

diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorDownloader.java b/src/main/java/org/torproject/onionoo/updater/DescriptorDownloader.java
index 9e2f80d..d5b6c49 100644
--- a/src/main/java/org/torproject/onionoo/updater/DescriptorDownloader.java
+++ b/src/main/java/org/torproject/onionoo/updater/DescriptorDownloader.java
@@ -52,9 +52,6 @@ class DescriptorDownloader {
     case BRIDGE_EXTRA_INFOS:
       this.directory = "bridge-descriptors/extra-infos/";
       break;
-    case BRIDGE_POOL_ASSIGNMENTS:
-      this.directory = "bridge-pool-assignments/";
-      break;
     default:
       log.error("Unknown descriptor type.");
       return;
diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorHistory.java b/src/main/java/org/torproject/onionoo/updater/DescriptorHistory.java
index 0f6f578..e6d911e 100644
--- a/src/main/java/org/torproject/onionoo/updater/DescriptorHistory.java
+++ b/src/main/java/org/torproject/onionoo/updater/DescriptorHistory.java
@@ -8,5 +8,4 @@ enum DescriptorHistory {
   BRIDGE_STATUS_HISTORY,
   BRIDGE_SERVER_HISTORY,
   BRIDGE_EXTRAINFO_HISTORY,
-  BRIDGE_POOLASSIGN_HISTORY,
 }
\ No newline at end of file
diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java b/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java
index b86d585..6740ca9 100644
--- a/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java
+++ b/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java
@@ -89,9 +89,6 @@ class DescriptorQueue {
     case BRIDGE_EXTRA_INFOS:
       directoryName = "bridge-descriptors/extra-infos";
       break;
-    case BRIDGE_POOL_ASSIGNMENTS:
-      directoryName = "bridge-pool-assignments";
-      break;
     case EXIT_LISTS:
       directoryName = "exit-lists";
       break;
@@ -133,9 +130,6 @@ class DescriptorQueue {
     case EXIT_LIST_HISTORY:
       historyFileName = "exit-list-history";
       break;
-    case BRIDGE_POOLASSIGN_HISTORY:
-      historyFileName = "bridge-poolassign-history";
-      break;
     case RELAY_CONSENSUS_HISTORY:
       historyFileName = "relay-consensus-history";
       break;
diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java b/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java
index b26a692..a1e489e 100644
--- a/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java
+++ b/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java
@@ -101,10 +101,6 @@ public class DescriptorSource {
     log.debug("Reading recent " + DescriptorType.BRIDGE_EXTRA_INFOS + " ...");
     this.readDescriptors(DescriptorType.BRIDGE_EXTRA_INFOS,
         DescriptorHistory.BRIDGE_EXTRAINFO_HISTORY, false);
-    log.debug("Reading recent " + DescriptorType.BRIDGE_POOL_ASSIGNMENTS
-        + " ...");
-    this.readDescriptors(DescriptorType.BRIDGE_POOL_ASSIGNMENTS,
-        DescriptorHistory.BRIDGE_POOLASSIGN_HISTORY, false);
     log.debug("Reading recent " + DescriptorType.BRIDGE_STATUSES + " ...");
     this.readDescriptors(DescriptorType.BRIDGE_STATUSES,
         DescriptorHistory.BRIDGE_STATUS_HISTORY, false);
@@ -147,9 +143,6 @@ public class DescriptorSource {
     case BRIDGE_EXTRA_INFOS:
       log.info("Read recent bridge extra-info descriptors");
       break;
-    case BRIDGE_POOL_ASSIGNMENTS:
-      log.info("Read recent bridge-pool assignments");
-      break;
     }
   }
 
diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorType.java b/src/main/java/org/torproject/onionoo/updater/DescriptorType.java
index 41956da..60d2759 100644
--- a/src/main/java/org/torproject/onionoo/updater/DescriptorType.java
+++ b/src/main/java/org/torproject/onionoo/updater/DescriptorType.java
@@ -10,6 +10,5 @@ public enum DescriptorType {
   BRIDGE_STATUSES,
   BRIDGE_SERVER_DESCRIPTORS,
   BRIDGE_EXTRA_INFOS,
-  BRIDGE_POOL_ASSIGNMENTS,
 }
 
diff --git a/src/test/java/org/torproject/onionoo/updater/DummyDescriptorSource.java b/src/test/java/org/torproject/onionoo/updater/DummyDescriptorSource.java
index 3664e25..10df38a 100644
--- a/src/test/java/org/torproject/onionoo/updater/DummyDescriptorSource.java
+++ b/src/test/java/org/torproject/onionoo/updater/DummyDescriptorSource.java
@@ -64,7 +64,6 @@ public class DummyDescriptorSource extends DescriptorSource {
       case BRIDGE_STATUSES:
       case BRIDGE_SERVER_DESCRIPTORS:
       case BRIDGE_EXTRA_INFOS:
-      case BRIDGE_POOL_ASSIGNMENTS:
       default:
         relay = false;
         break;

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