You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dht: routing-table poison recovery is split between the republisher and the query path #1816
#1813 routed the two routing-table Mutex sites in crates/node/src/dht/publish.rs through chain_projection::with_lock, so the republisher recovers from a poisoned table instead of returning early. The same Arc<Mutex<RoutingTable>> is locked elsewhere without recovery:
Site
On poison
crates/node/src/handlers/dht.rs — closest_to
returns CloserNodes::default() on every inbound FindNode/FindValue
crates/node/src/handlers/dht.rs — note_peer_seen
bare if let Ok(..) with no else; every learned peer silently dropped
crates/node/src/dht/bucket_refresh.rs
same shape, silent
crates/node/src/dht/bootstrap.rs
same shape, silent
Before #1813 a poisoned table degraded the whole routing path uniformly. Now the republisher keeps working while the query path answers every lookup with an empty table — a node that looks healthier and is harder to diagnose.
closest_to's comment calls the empty answer "honest at this moment regardless of the lock state". It is not: it is an assertion about the table's contents that the code cannot make from a poisoned guard.
Suggested fix
Route all four through with_lock. Since #1813 the helper clears the poison as it recovers, so the warn is one line per panic rather than one per inbound request — which is what made recovery on these hot paths unattractive before.
note_peer_seen's bare if let Ok should not stay silent either way.
Activity
fix(node,cache,dht): address the multi-agent review of #1813
fix(node,cache,dht): close the six #1806 review follow-ups (#1813)