[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #25163 [Core Tor/Tor]: rephist: Remove unused counters in or_history_t
#25163: rephist: Remove unused counters in or_history_t
------------------------------+---------------------------------------
Reporter: dgoulet | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: tor-rephist, code-removal
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+---------------------------------------
The rephist subsystem seems to track EXTEND cells attempt (on the client
side) but the overall results of this is not used except in
`rep_hist_dump_stats()`. This is the only use of `link_history_t` also
afaict. See:
{{{
void rep_hist_note_extend_succeeded(const char *from_name,
const char *to_name);
void rep_hist_note_extend_failed(const char *from_name, const char
*to_name);
}}}
Furthermore, tor tracks downtime and uptime of relays but actually never
use that information anywhere. See:
{{{
void rep_hist_note_connect_failed(const char* nickname, time_t when);
void rep_hist_note_connect_succeeded(const char* nickname, time_t when);
void rep_hist_note_disconnect(const char* nickname, time_t when);
void rep_hist_note_connection_died(const char* nickname, time_t when);
}}}
The side effect of this is that we keep adding objects to the
`history_map` that are wasting memory and never used in the end except
when we dump statistics.
By removing this, we would cleanup quite a bit of code and effectively
make the `or_history_t` object *ONLY* useful to directory authorities for
relay reachability tracking.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25163>
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