fix(rivetkit): prevent connection snapshot stalls - #5579
Conversation
NathanFlurry
commented
Aug 20, 2026
- Snapshot connection handles before exposing the iterator so retained reads cannot block connection map writers.
- Preserve exact iterator sizing and document live-handle snapshot semantics.
- Add regression coverage for disconnecting while a connection snapshot is retained.
|
🚅 Deployed to the actors-pr-5579 environment in rivet-frontend
|
58d93ae to
4e95762
Compare
|
Review Small, well-scoped fix: Ordering is preserved ( Performance: hot-path regression in
if !self.conns().is_empty() {
return CanSleep::ActiveConnections;
}Previously
Minor nit
Test coverage The new test directly targets the fixed race and is a good regression guard. No NAPI/TS-level test needed since this is pure Overall: solid, minimal fix for a real deadlock-shaped bug, with one easy efficiency follow-up on the sleep hot path. |