Fix potential statifier wedging #610
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
parasitepool/para!610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-stratifer-wedge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes this:
M1. Slow reader wedges session —
src/stratifier.rsckpool: never writes to a client socket inline. A sender thread drains a
queue with non-blocking writes; a client blocked > 60 s is disconnected
(
connector.c:730-777). Receive side: disconnect if buffer > 1024 B withoutEOL (
connector.c:494-573).Design (para):
mpsc::channel<String>(capacity ~64).Writer drains frames into the existing
FramedWrite<OwnedWriteHalf, LinesCodec>.send()becomestry_send. On full channel: close the connection(ckpool's drop-on-stall equivalent). Precedent:
send_eventatsrc/stratifier.rs:1231-1237.serve()breaks -> drop sender ->writer flushes and exits.
Drop for Stratifier(:1240-1266) unchanged.tx.closed()in theserve()select loop breaks the connection.LinesCodec::new_with_max_length(MAX_MESSAGE_SIZE)— nochange needed.
Constraint: request/response ordering is pinned by integration tests
(
tests/pool.rs:220-264, bouncer test:1261-1460). Writer task preservesit.