Skip to content

Refactor FallbackDir handling and implement a retry-after-delay mechanism.

Nick Mathewson requested to merge nickm/arti:fallback_status_v2 into main

This is an improved version of !430 (closed). That branch moved FallbackDir into circmgr, and added a lot of extra machinery there in order to handle FallbackDir status tracking in a similar way to that used by guards.

This branch, by contrast, moves FallbackDir into guardmgr, and re-uses existing guard-handling machinery to give out fallback directories when guards are unavailable. It uses the same reporting machinery to tie in the FallbackDir status checking API with the status checking used for guards.

As a nice side effect, this branch solves #220 (closed) by checking for usable guards before using any fallbacks.

The situation with #406 (closed) is also improved. Previous behavior:

TCP stats: TcpCount { n_connect_attempt: 2140, n_connect_ok: 2140, n_accept: 0, n_bytes_send: 2446020, n_bytes_recv: 7411362 }
Total events: Trace: 25698, Debug: 3680, Info: 4206, Warn: 26, Error: 0

With this branch:

TCP stats: TcpCount { n_connect_attempt: 6, n_connect_ok: 6, n_accept: 0, n_bytes_send: 6858, n_bytes_recv: 20918 }
Total events: Trace: 94, Debug: 1354, Info: 473, Warn: 22, Error: 0

Closes #220 (closed). Closes #406 (closed).

Merge request reports

Loading