r12847@catbus: nickm | 2007-05-21 21:55:47 -0400
Backport r12842: Make stores get rebuild at the proper time, and note dropped bytes better. svn:r10246
This commit is contained in:
parent
1837b5670f
commit
8cf3fd98ec
|
@ -26,6 +26,9 @@ Changes in version 0.1.2.14 - 2007-0?-??
|
|||
having a hard time downloading.
|
||||
- Read resolv.conf files correctly on platforms where read() returns
|
||||
partial results on small file reads.
|
||||
- Don't rebuild the entire router store every time we get 32K of
|
||||
routers: rebuild it when the journal gets very large, or when
|
||||
the gaps in the store get very large.
|
||||
|
||||
o Minor features:
|
||||
- When routers publish SVN revisions in their router descriptors,
|
||||
|
|
|
@ -241,7 +241,6 @@ _compare_routers_by_age(const void **_a, const void **_b)
|
|||
static int
|
||||
router_rebuild_store(int force)
|
||||
{
|
||||
size_t len = 0;
|
||||
or_options_t *options;
|
||||
size_t fname_len;
|
||||
smartlist_t *chunk_list = NULL;
|
||||
|
@ -337,7 +336,8 @@ router_rebuild_store(int force)
|
|||
write_str_to_file(fname, "", 1);
|
||||
|
||||
r = 0;
|
||||
router_store_len = len;
|
||||
tor_assert(offset >= 0);
|
||||
router_store_len = (size_t) offset;
|
||||
router_journal_len = 0;
|
||||
router_bytes_dropped = 0;
|
||||
done:
|
||||
|
@ -1715,6 +1715,7 @@ routerlist_replace(routerlist_t *rl, routerinfo_t *ri_old,
|
|||
digestmap_remove(rl->desc_digest_map,
|
||||
ri_old->cache_info.signed_descriptor_digest);
|
||||
}
|
||||
router_bytes_dropped += ri_old->cache_info.signed_descriptor_len;
|
||||
routerinfo_free(ri_old);
|
||||
}
|
||||
// routerlist_assert_ok(rl);
|
||||
|
|
Loading…
Reference in New Issue