From 50840b5e42f877a0d36d4341e8b949aae1069181 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 5 Nov 2026 16:28:20 +0100 Subject: Add the paragraph in the design decisions document --- DESIGN | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'DESIGN') diff --git a/DESIGN b/DESIGN index eb5d1e1..323a753 100644 --- a/DESIGN +++ b/DESIGN @@ -93,6 +93,13 @@ way, 3089 of them refused over 373 ms against a two million entry whitelist. The first read is therefore synchronous in accesslist_init, and the thread only handles reloads. +Nothing that adds a peer starts before the state file has been read. That is +the TCP and UDP listeners and live sync, so main starts all three after +load_state rather than leaving live sync inside trackerlogic_init. A cluster +packet arriving in that window created the torrent, and the saved state for it +was then dropped on the exactmatch add_torrent_from_saved_state bails on, +losing that torrent's completed count. + Teardown stops the cleaner first. It is the one worker that calls into other modules, accesslist_cleanup and stats_cleanup, so stopping it after them left it locking a mutex accesslist_deinit had already destroyed: five shutdowns in -- cgit v1.3