Commit Graph

19 Commits

Author SHA1 Message Date
Maksim Sirotenko 280a392164 Fix ME writer cleanup races and quarantine bypass during flapping
Three bugs caused ME writers to not be properly removed when ME
connections flapped:

1. Reader task's unconditional ws.retain() removed writers from the
   pool Vec without going through remove_writer_only(), skipping
   registry cleanup, quarantine, and refill side effects. Fixed by
   moving retain inside the cleanup_done CAS block as shutdown-only
   fallback.

2. Draining writers bypassed quarantine entirely because trigger_refill
   gated both quarantine and refill. Separated: quarantine now runs for
   all removals (flapping endpoint is unstable regardless of drain
   state), refill remains non-draining only.

3. connectable_endpoints() returned quarantined endpoints immediately
   when all DC endpoints were quarantined, nullifying the circuit
   breaker for single-endpoint DCs. Now waits for quarantine expiry
   with proper Mutex guard drop before sleep.

Also normalized the CAS ordering in ping task cleanup to match the
reader task (CAS-first, then pool.upgrade check).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:36:46 +03:00
Alexey 3279f6d46a
Cleanup-path as non-blocking
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-19 14:07:20 +03:00
Alexey 6f9aef7bb4
ME Writer stuck-up in draining-state fixes
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-19 13:08:35 +03:00
Alexey 89e5668c7e
Runtime guardrails
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-18 22:33:41 +03:00
Alexey ac0698b772
ME Writer Rebinding - Lifecycle and Consistency fixes 2026-03-15 00:17:54 +03:00
Alexey 780fafa604
Src-IP in ME Routing + more strict bind_addresses 2026-03-14 02:20:51 +03:00
Alexey 633af93b19
DC to Client fine tuning 2026-03-08 04:51:46 +03:00
Alexey c08160600e
Update pool_writer.rs 2026-03-08 03:03:41 +03:00
Alexey d2baa8e721
CPU/RAM improvements + removing hot-path obstacles 2026-03-07 19:33:48 +03:00
Alexey 5f77f83b48
ME Adaptive Floor Upper-Limit 2026-03-07 17:27:56 +03:00
Alexey 258191ab87
Routed DC + Strict ME Writers
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-07 13:40:57 +03:00
Alexey 27e6dec018
ME Strict Writers
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-07 13:32:02 +03:00
Alexey a6132bac38
Idle tolerance + Adaptive floor by default + RPC Proxy Req
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-03 23:16:25 +03:00
Alexey e589891706
ME Dual-Trio Pool Drafts 2026-03-02 20:41:51 +03:00
Alexey 49f4a7bb22
ME Hardswap Generation stability
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-02 00:39:18 +03:00
Alexey 6f1980dfd7
ME Pool improvements
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-02 00:17:58 +03:00
Alexey 3d9660f83e
Upstreams for ME + Egress-data from UM + ME-over-SOCKS + Bind-aware STUN 2026-02-28 01:20:17 +03:00
Alexey 144f81c473
ME Dead Writer w/o dead-lock on timeout 2026-02-26 19:37:17 +03:00
Alexey 4eebb4feb2
ME Pool Refactoring 2026-02-26 19:01:24 +03:00