diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-15 13:23:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-24 11:01:40 -0400 |
commit | 7ca86b9cd65ba4c7ed3c36f0c56c97ad4b075585 (patch) | |
tree | 6694bd5903d6e2387639683e3ee6929657604e89 /src/test | |
parent | 69a212ff3df2020fe67cedb71982b2198c31fe18 (diff) | |
download | tor-7ca86b9cd65ba4c7ed3c36f0c56c97ad4b075585.tar.gz tor-7ca86b9cd65ba4c7ed3c36f0c56c97ad4b075585.zip |
Add a hashtable to consdiffmgr to keep track of diff status
In several places in the old code, we had problems that only an
in-memory index of diff status could solve, including:
* Remembering which diffs were in-progress, so that we didn't
re-launch them.
* Remembering which diffs had failed, so that we didn't try to
recompute them over and over.
* Having a fast way to look up the diff from a given consensus to
the latest consensus of a given flavor.
This patch adds a hashtable mapping from (flavor, source diff), to
solve the problem. It maps to a cache entry handle, rather than to
a cache entry directly, so that it doesn't affect the reference
counts of the cache entries, and so that we don't otherwise need to
worry about lifetime management.
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions