aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-06-02 00:47:51 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-02 00:47:51 -0400
commit723894f114ef091ba09e3ab7440d4339bbc21430 (patch)
tree6d446f739306222c641ea5cca1ea28acb61d866e
parentbe9058003da9b75abbf0403743e7631dc29ba27c (diff)
parentad8977e39461807dd04e34dc7fa3c12ccef0b62d (diff)
downloadtor-723894f114ef091ba09e3ab7440d4339bbc21430.tar
tor-723894f114ef091ba09e3ab7440d4339bbc21430.tar.gz
Merge remote-tracking branch 'public/bug12170_024_v2'
-rw-r--r--changes/bug1217011
-rw-r--r--src/or/nodelist.c6
2 files changed, 15 insertions, 2 deletions
diff --git a/changes/bug12170 b/changes/bug12170
new file mode 100644
index 000000000..e462e4fa7
--- /dev/null
+++ b/changes/bug12170
@@ -0,0 +1,11 @@
+ o Major bugfixes (performance):
+ - Do not recompute whether we have sufficient information to build
+ circuits every time we make a successful connection. Previously,
+ we would forget our cached value for this flag every time we
+ successfully opened a channel (or marked a router as running or not
+ running for any
+ other reason), regardless of whether we had
+ previously believed the router to be running. This forced us to
+ run a fairly expensive update operation with relatively
+ high frequency.
+ Fixes bug 12170; bugfix on 0.1.2.1-alpha.
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 09232f9f9..8f870816d 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1249,10 +1249,12 @@ router_set_status(const char *digest, int up)
if (!up && node_is_me(node) && !net_is_disabled())
log_warn(LD_NET, "We just marked ourself as down. Are your external "
"addresses reachable?");
+
+ if (bool_neq(node->is_running, up))
+ router_dir_info_changed();
+
node->is_running = up;
}
-
- router_dir_info_changed();
}
/** True iff, the last time we checked whether we had enough directory info