[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #1790 [Tor Relay]: Count bytes spent on answering directory requests
#1790: Count bytes spent on answering directory requests
-------------------------+--------------------------------------------------
Reporter: karsten | Owner: karsten
Type: enhancement | Status: needs_review
Priority: normal | Milestone:
Component: Tor Relay | Version:
Keywords: | Parent:
-------------------------+--------------------------------------------------
Changes (by karsten):
* cc: arma (added)
Comment:
Oh ho! When looking up when this bug was introduced, I found:
{{{
commit 1c62b9d5fa21a802f26579379bd7b5d0fc17af9c
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date: Sat Oct 10 14:52:41 2009 -0400
fix a bug where we were decrementing the wrong bucket
i think this doesn't actually affect anything, since linked
conns usually don't impact buckets
diff --git a/src/or/connection.c b/src/or/connection.c
index 18464d2..ca71373 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2352,7 +2352,7 @@ loop_again:
if (n_read) {
/* Probably a no-op, but hey. */
- connection_buckets_decrement(linked, approx_time(), 0, n_read);
+ connection_buckets_decrement(linked, approx_time(), n_read, 0);
if (connection_flushed_some(linked) < 0)
connection_mark_for_close(linked);
}}}
Roger, any objections if I undo your fix? See my comment above that makes
me think we want to count n_read bytes as written bytes on the linked
connection. We might even add a comment saying why we do what we do.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1790#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs