Skip to content

feat(qwp): recycle symbol dictionaries at safe flush boundaries - #213

Draft
jovfer wants to merge 13 commits into
mainfrom
sm_qwp_dict_recycle
Draft

jovfer wants to merge 13 commits into
mainfrom
sm_qwp_dict_recycle

Conversation

@jovfer

@jovfer jovfer commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Long-lived QWP/WebSocket store-and-forward senders retain symbol dictionaries as new values arrive, eventually reaching the dictionary limits even after older frames are acknowledged. This change lets those senders recycle a drained dictionary at a safe public flush boundary and start a fresh wire session while preserving the live sender's frame sequence numbers, slot ownership, progress observers, and cumulative accounting.

Recycling is enabled by default. It is armed after a successful publication reaches the configured threshold and current hysteresis floor, then runs before encoding the next eligible nonempty publication. It cannot split a public publication or an open deferred-commit group, discard unresolved frames, or release and reacquire the live slot lock.

Behavior and API

Setting Default Accepted values
symbol_dict_reset on on, off
symbol_dict_reset_threshold 100000 1..=1000000
symbol_dict_reset_max_wait_millis 2000 0..=9223372036854
  • Add Rust reset_symbol_dictionary() advisory methods on standalone and pooled sender APIs. Requests coalesce and schedule a future safe reset; they do not themselves flush, wait, connect, or guarantee completion. Disabled recycling is a no-op, while closed/terminal senders retain their existing errors.
  • Retain the hysteresis floor across resets: automatic rearming requires the configured threshold and at least twice the previous dictionary size, capped at one million. An already-drained sender can recycle immediately; armed age gates only the optional bounded drain wait, which is spent at most once per arm and survives pool return/reborrow. Zero disables waiting.
  • Preserve the two-million-entry and 256 MiB symbol UTF-8 caps. A single large publication can still exhaust the dictionary before recycling becomes safe; this is not a new hard dictionary-memory budget.
  • Sender::must_close() (and line_sender_must_close) follows the publication lifecycle for QWP/WebSocket: a server rejection or protocol violation retires the sender, while recoverable SocketErrors (a back-pressure timeout, a periodic-sync durability latch, a storage fault during recycling) do not. This also removes the pre-existing latch after an append timeout.

Implementation and scope

  • Seal publication, stop and join the old worker, and recheck terminal, durability, and drain state before destructive maintenance. Reset storage and the dictionary through explicit resumable phases under the retained slot owner. Preserve existing on-disk formats and durability guarantees.
  • A claim that finds the store terminal after parking drops the parked session so its connection closes at once. A claim that finds a periodic-sync failure latched after parking (the worker's in-flight sync failed while it was stopping) hands the session back to a restarted worker instead of staying sealed: the ordinary retry clears the latch, as it does without recycling, and a later flush claims again.
  • The worker parks its session only when a recycle claim asked it to stop; a terminal or closing exit drops it, so a terminal sender releases its server connection before it is dropped.
  • Reset back-pressure at the drained boundary runs trim-only maintenance (never the cadence sync, whose failure would latch durability with no worker to clear it) until the reset can reserve its segment or the append deadline passes, then reports the residual back-pressure as the same SocketError an append timeout produces. A deferred trim barrier is slept out until its retry time instead of polled, and a budget with no acknowledged segment left to trim fails at once (defensive: the capacity validation makes it unreachable).
  • Chunk/Arrow input validation runs only when a recycle is about to be claimed or resumed. An armed policy whose claim cannot succeed (undrained queue, link down, open deferred group) costs a flush nothing beyond the snapshot.
  • Close with a drained reset that a storage fault interrupted abandons the reset inside the queue (topology reservation released, borrowed spare or budget returned) and runs its ordinary drained close, so the slot is released at close rather than at drop; every frame is acknowledged and no worker remains to finish it, and the queue's own close keeps refusing while a resumable reset is pending. Manual drive_once (and wait, which drives) resumes a parked recycle and always drives orphan drainers. A failed socket-timeout restore on a peer-reset socket during the bounded wait joins the reconnect instead of failing the flush (macOS/BSD return EINVAL there). A worker-thread spawn failure while un-parking marks the session terminal, as a worker panic does.
  • Install a fresh dictionary mirror, wire sequence, send cursor, and session ACK state while retaining lifetime FSNs, listeners, counters, and endpoint history. Subsequent connection attempts use established store-and-forward retry behavior; manual progress remains manual.
  • Cover standalone/pooled senders, memory/disk storage, background/manual progress, Buffer/Chunk/Arrow, and Polars converted to pooled Arrow. Existing C/C++ configuration routes inherit automatic recycling. The direct whole-source backend, including QuestDb::flush_polars_dataframe, remains excluded; no C manual-reset ABI is added.

Validation

  • Live-server gate: the Vs QuestDB master CI job (TestVsQuestDBMaster) and enterprise-e2e-c-client.
  • Full Rust suite with almost-all-features,arrow,polars on Rust 1.91.1: 2,710 passed, 0 failed, 27 ignored.
  • Recycle and terminal test filter: 121 passed, 0 failed (9 new regression tests; 6 of the 7 behavioral ones fail at the previous head without the fixes, the durability-latch test needs a hook that did not exist there).
  • Additional feature matrix: default 1,967; aws-lc sync 1,421; ring sync 1,421; tcp-only 216; http-only 228; reader-only 597; almost-all 2,417; qwp-ws+arrow 2,091; FFI 88 default and 120 Arrow; all 0 failed.
  • Existing OSS system suite against pinned QuestDB 10.0.2-SNAPSHOT (2bffcfd4): 710 passed, 421 expected skips. Named churn/restart/bounce tests assert observed resets and complete row-to-symbol mappings. Enterprise validation covers actual demote/promote barriers, Rust/C/C++ row senders, and Chunk/Arrow/Polars automatic, disabled, and advisory modes with durable ACKs.
  • Process-kill recovery cuts, retained external/orphan slot ownership, immediate close after terminal errors, TLS drain deadlines, repeated success/failure-resume cycles, and deliberately failing/restored guard mutations cover the destructive and lifecycle boundaries. Deduplicated live tests establish logical no-loss, not exactly-once delivery.
  • Formatting, plain clippy (CI invocation), documentation checks, and expanded-feature rustdoc passed.

Review round 1

All seven findings of the first review and its adjacent base finding are addressed. Where the fix differs from the reviewer's suggestion:

  • Finding 1 (durability latch strands a parked session): the claim un-parks the retained session and restarts the worker rather than retrying the periodic sync from the foreground. The restarted worker owns the retry exactly as it does without recycling, so no flush path needs a foreground maintenance hook, and a claim is re-attempted by the next flush once the latch clears. A latch can no longer be set while parked, because the drained reset's maintenance never runs the cadence sync (finding 6).
  • Finding 3, close: close abandons the interrupted reset (the queue releases its topology reservation) and closes normally, rather than finishing or rolling it back on disk. Finishing can fail again on a persistent fault; at the drained boundary every old frame is acknowledged, so close's covering barrier and drained cleanup leave the slot in its normal closed state from any phase, and the slot lock is released at close. An earlier draft of this round left the reset to slot recovery instead; the independent delta review pointed out that this held the slot lock until drop.
  • Finding 6: the reset runs trim-only maintenance in a deadline-bounded loop instead of looping the general step list, so a due periodic sync can neither starve the trim nor latch durability while the worker is parked.
  • Finding 7: the mock withholds ACKs through its existing switch until the bounded wait has returned; the wall-clock bound is relaxed to 2 s, which still proves the wait is bounded because an unbounded wait would never return. Stressing the rewritten test under build load still produced the CI failure signature (same == 1) with no ACK in play, which exposed a wire-level defect behind it: when the drain deadline expired between the driver's time check and the socket read, the socket helper returned a "deadline expired" error for a read it never attempted, the reader reported that as a disconnect, and the next progress call reconnected and replayed. An expired deadline now bounds the call with the smallest positive timeout instead of failing it (ws/nosigpipe.rs), with a unit test for the idle-read and small-write cases.
  • Adjacent base finding (must_close latched after an append timeout): fixed by the same change as finding 3 instead of being filed separately, since the fix is one line class and both symptoms share it.

Independent delta review of this round (fresh agent, diff only): two gaps and one new defect it found are fixed above (slot lock held until drop; a thread-spawn failure during un-park re-stranding the session; the reset loop polling the append deadline at 50 µs). Not taken: a pooled-level test that validate_chunk/validate_arrow_batch are skipped while armed-but-blocked. The skip is decided in PublicationRecycle::before_publication, which is unit-tested with a counting callback; the pooled sites only forward their validator closures, and the skip is not observable there without instrumentation because the encode path validates the same input.

Findings not taken from the review itself: none.

Draft status and remaining validation limits

  • Windows runtime and remote all-platform CI are unverified beyond the PR's own CI runs.
  • Existing benchmark comparisons against 5ea51a47 show unresolved throughput declines: symbol validation/descriptor append 7.16%, f64 append 4.66%, and S1 below-threshold row wall throughput 8.19% with substantial variance. Source/disassembly inspection did not identify additional hot-path work; this is not a general no-regression result. The validation change from review finding 2 removes the per-flush validation pass while a recycle is armed but blocked; it has not been re-measured.
  • Native Linux allocation captures of the existing workloads show unchanged column allocation-call counts; the S1 below-threshold whole-process capture adds 39 calls / 6,388 requested bytes versus base. These are single captures including setup, not isolated per-flush costs. S2 baseline profiling crashed before Sender/network activity, so that allocation comparison remains unverified. Earlier baseline Valgrind reports remain unresolved and are not cleared by successful native tracing.
  • Performance measurements use production implementation f017fda5; later commits name the cold maintenance phases, strengthen close tests, clarify documentation and apply the review fixes. Measurements were not rerun on them. High-cardinality connection observations cover the whole warmup/measurement invocation, not exact per-pass recycle cadence.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jovfer

jovfer commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

Reviewing PR #213 at level 3, head 3267f6e, base 5ea51a4.

Verdict: request changes. Two blocking defects, five Moderate issues, and the PR's CI is currently red because of one of its own new tests.

Every finding below was reproduced by an independent falsifier at both the head and base commits, in scratch worktrees. Wherever a real producer existed (slot-directory permission change, TCP reset), it was used; the remaining injections fire at the real failure site. The evidence for both Critical findings was re-run a second time.

PR metadata. The title follows the repo's conventional-commit style. The PR is still a draft. The description puts numbers in bold and doesn't name TestVsQuestDBMaster as the live-server gate.

Critical

1. A transient fsync failure during a recycle leaves the sender unable to publish, permanently

  • Problem: if a periodic-sync failure is latched while a recycle is parking the worker, nothing ever retries the sync.
  • Net impact: disk store-and-forward with sf_durability=periodic. Every later flush fails for the rest of the sender's life, and a pooled sender keeps being lent out in that state.
  • Evidence: at head, with recycling on, 0 of 24 flushes succeed over 6 s and the sync is retried 0 times. With recycling off, or at base, the same fault recovers by the third or fourth flush.

How it happens:

  1. A flush claims the recycle in request_recycle (qwp_ws.rs:1411), stops the worker, and waits for it to exit.
  2. The worker first finishes its in-flight periodic sync. That sync fails, and finish_periodic_sync (qwp_ws_sfa_queue.rs:2579) sets the durability latch.
  3. After the worker is joined, check_store_error (qwp_ws.rs:1478) returns an error, leaving the recycle pending with no worker thread.
  4. Only the worker ever retries a periodic sync and clears the latch, and it is gone. Every later flush and reset_symbol_dictionary() fails the error check first and never reaches recycle resume.

Who sees it: the standalone Sender at least reports must_close()=true, so a caller following that contract reopens and recovers. A pooled sender stays must_close=false, so the pool keeps handing the stuck sender to new borrowers until the pool is closed.

Trigger: a slow fsync that ends in EIO/ENOSPC while a recycle is being claimed. The window is narrow, but it widens on degrading storage, where failing fsyncs are slow and the claim waits up to 30 s for exactly that sync. The default sf_durability=memory is not affected. Classification: in-diff.

Suggested fix: a non-terminal store error seen after parking must not strand the session. Either:

  • respawn the parked worker on the old session, clear the pending recycle, and let the existing retry clear the latch; or
  • run the periodic-sync retry from the foreground before re-checking.

2. Every pooled Arrow flush pays an extra full validation pass while recycling is armed but cannot run

  • Problem: validate_arrow_batch runs whenever recycling is armed or pending, not only when a recycle is about to execute.
  • Net impact: pooled Arrow/Polars ingestion past the symbol threshold. Each flush gets 14–68% slower, and this can last indefinitely.
  • Evidence: release build, 500k rows. Armed but not drained: 46.8 ms per flush. Off, not armed, and base: about 27.5 ms.

Code path: column_sender/sender.rs:2080 checks needs_recycle_boundary() (qwp_ws.rs:785, which is "armed or pending") and then validates the batch. Whether the queue is drained is only checked afterwards, inside before_publication. When it isn't drained, request_recycle returns None, the validation result is thrown away, and the policy stays armed.

Measurements (8 columns: 3 Utf8 symbol columns, 1 dictionary symbol column, 4 others):

  • Validation alone costs 19 ms per 500k rows, about 75% of encode time.
  • That is +68% for a single-frame batch and +14% with the default 4 MiB segments, which split the batch into many frames.

How long the armed state lasts:

  • Outage: 80 of 80 flushes were validated, and no bounded wait was taken because the link wasn't live.
  • ACK latency above max_wait (3 s delay, default 2 s wait): 79 of 79 flushes were validated. The single 2 s wait timed out and the recycle never ran, so the cost continues indefinitely.
  • Healthy server with fast ACKs: only the first armed flush pays.

Durable-ACK mode, where "drained" means durably acknowledged, is the obvious real-world case of long ACK latency. That case was not executed separately. Classification: in-diff.

Suggested fix: take the drained/live snapshot first. Validate only when a recycle is pending, or when the snapshot shows a claim will be attempted (drained, live, no open deferred group). For example, pass the validation as a callback that before_publication invokes right before claim_recycle.

Moderate

3. A recoverable recycle failure leaves the standalone sender in a misleading parked state

  • Problem: after a storage fault during a recycle, only a later flush resumes it. Other APIs either report a failure that isn't real or stop working.
  • Net impact: disk store-and-forward users who hit a filesystem fault during a recycle (EACCES, EIO, or on Windows a scanner holding an old .sfa file open).
  • Evidence: a real fault (slot directory set to 0000 or 0500, or .symbol-dict set to 0444) fails the recycle. At base, the same faults leave the flush, close_drain, and drive_once all working.

Symptoms, each executed:

  • must_close() stays true: Sender::must_close() and line_sender_must_close return true from the failed flush onward. This holds even after the next flush resumes the recycle and delivery continues on a fresh connection. The pooled path reports false for the same faults.
    • Cause: the recycle errors are all SocketError, and the unchanged sender.rs:405 sets connected = false on any SocketError. Nothing ever sets it back.
  • close_drain fails although everything was acknowledged:
    • Background mode: blocks the full close_flush_timeout (5.0 s), then returns "close drain timed out before all published frames were acknowledged", although acked == published.
    • Manual mode: fails in microseconds with StorageMaintenanceInFlight.
    • Cause: topology_io_in_flight/resetting (qwp_ws_sfa_queue.rs:1299–1300) are only cleared when the reset succeeds, and no worker is left to signal the waiter.
    • Afterwards the lifecycle is Closing, so nothing can resume the sender in that session. Reopening the slot recovers with no loss.
    • This reproduced at every storage-reset barrier.
  • Manual drive_once keeps failing: every call returns "publication is parked for dictionary recycling" (qwp_ws.rs:4972), about 200 errors in 600 ms. With drain_orphans=on, orphan slots stall until a flush, empty or not, resumes the recycle. drain_orphans defaults to off.

Note that base already latches must_close on a recoverable backpressure timeout (see Adjacent below); this PR adds new members to that class. Classification: in-diff, plus out-of-diff-breakage at the unchanged sender.rs:405 and close-drain loop.

Suggested fix:

  • Don't latch connected for recycle-maintenance errors, matching the pooled behavior.
  • Make close_drain/close finish or roll back a pending storage reset, then close normally.
  • Have drive_once resume the pending recycle, or at least drive orphan drainers.

4. macOS: a server reset during the manual-mode bounded wait fails the flush

  • Problem: restoring the socket timeouts on a reset socket fails with EINVAL, and that error escapes as a flush failure.
  • Net impact: macOS/BSD users in manual progress mode. A transient connection reset becomes a flush error plus must_close=true.
  • Evidence: 24 of 24 runs at head returned SocketError: Could not restore recycle IO timeouts: Invalid argument (os error 22). A graceful FIN control and a no-recycle control both returned Ok, and base returned Ok with an ordinary reconnect.

Code path:

  • drive_recycle_once (qwp_ws_driver.rs:2037–2039) combines the drain result with end_recycle_io using result.and(restored).
  • end_io_deadline (qwp_ws.rs:374) calls setsockopt on a socket the peer has already reset.

The reset can arrive during the wait or just before the flush while the arm is aging. Linux was not tested and probably accepts the setsockopt.

Suggested fix: when the transport has already disconnected or scheduled a reconnect, treat a timeout-restore failure as part of that disconnect, not as an API error.

5. A terminal background sender keeps its server connection open until it is dropped

  • Problem: the worker now stores its core, including the socket, in the parked slot on every exit, including terminal exits.
  • Net impact: an application that keeps a terminal sender alive (for example, to read its errors) holds a server connection open.
  • Evidence: after a schema reject or protocol violation, the connection was still open after 10 s and closed within 0.1 ms of drop(sender). At base the server sees EOF immediately. Dropping the core instead of parking it restored base behavior.

Code: *slot = Some(self) at qwp_ws.rs:1175 and the pending-connect variant at qwp_ws.rs:1386. Both eager and async connect, in memory and file modes, are affected. A normal close_drain() behaves the same on head and base.

Suggested fix: park the core only when a recycle claim requested the stop. On any other exit, drop it, as base did.

6. Reset backpressure returns InvalidApiCall and may never converge

  • Problem: when the storage reset hits the segment-budget cap, the flush fails with InvalidApiCall: queue rejected publication: StorageSegmentCapFull.
  • Net impact: manual progress with sf_durability=periodic and a two-segment sf_max_total_bytes. Retries spaced at least one sync interval apart (default 5 s) fail indefinitely.
  • Evidence: with spaced retries at 1 ms, 50 ms, and the default 5000 ms sync intervals, every attempt failed, and only a back-to-back retry succeeded. Base completes the same flush sequence in about 40 ms. With symbol_dict_reset=off it succeeds.

Cause:

  • reset_recycle_storage (qwp_ws.rs:1055) runs exactly one maintenance step.
  • A due periodic sync takes that one step ahead of the trim.
  • drive_once refuses to run while the recycle is parked, so nothing else trims.

error.rs documents InvalidApiCall as caller misuse, so a caller has no reason to retry it. Background mode was not reproduced without a test hook.

Suggested fix: classify reset backpressure the same way as append backpressure, and loop maintenance steps (sync, trim, spare) until the reset can reserve space or the append deadline passes, as manual submit does.

7. A new timing-dependent test makes PR CI fail on mac and Windows

  • Problem: recycle_boundary_bounded_wait_times_out_without_changing_namespace relies on a race between a 150 ms mock ACK delay and a 25 ms sleep plus a 20 ms bounded wait.
  • Net impact: contributors and CI only; two cargo-test legs are red.
  • Evidence: Azure build 277114 ran the PR's merge commit baa7332c (parents: the base and the reviewed head). qwp_ws_recycle.rs:444, assert_eq!(old, same), failed with left 0, right 1 on both the mac and windows-msvc-2025 legs. Locally it passed 60 of 60 stressed runs and 6 of 6 full-suite runs.

same=1 means the ACK won the race and the recycle legitimately ran, so this is a flaky test, not a wire-level defect. Line 441 (elapsed < 100ms) is a second wall-clock assertion.

Suggested fix: withhold ACKs with the mock's existing acks_released switch until after the flush returns, and remove or relax the wall-clock bound.

Adjacent finding (already on base; not blocking — draft for a GitHub issue)

  • Problem: the standalone sender latches must_close permanently after a recoverable backpressure timeout.
  • Net impact: standalone QWP/WS senders that hit an append timeout are told to drop a sender that still works.
  • Location: questdb-rs/src/ingress/sender.rs:401–406 and :1052.
  • Symptom: proven at base with a 16 KiB store-and-forward cap and ACKs withheld. The flush fails with "append timed out waiting for ACK-driven segment trim" and must_close becomes true. After the ACKs arrive, flushes succeed but must_close stays true.
  • Suggested fix: latch connected only for unrecoverable transport failures, or re-arm it after a successful flush.
  • Severity if filed standalone: Moderate.

Coverage map

The test gate passes, with 0 admitted coverage gaps. The missing tests behind findings 1 and 3–6 are covered by those findings and not counted again. The recycle test subset passes at head (84 passed, matching the PR description).

Summary

  • Severity: 2 Critical, 5 Moderate, 0 Minor.
  • Diff scope: 5 findings are in-diff only. Finding 3 is in-diff plus out-of-diff breakage at unchanged callsites. Two findings (1 and 3) violate the store-and-forward invariant that a transient storage fault must not strand or mislabel a working sender.
  • Panic mode: questdb-rs-ffi uses panic = "abort" in dev and release. Overflow checks are the default (off in release). No caller-reachable panic was found among the new unwrap/expect/assert! sites.
  • Submodules: no pointer moves (questdb and corrosion unchanged).
  • CI:
    • TestVsQuestDBMaster and enterprise-e2e-c-client passed at the merge commit. That run doesn't exercise any of the fault paths above.
    • Two cargo-test legs fail, from finding 7.
  • Fix before merge:
    • finding 1: resume or un-park the session after a non-terminal error;
    • finding 2: validate only when a claim is imminent.
  • Should address: findings 3 and 7. Findings 4–6 are narrower but cheap to fix.

jovfer and others added 2 commits October 14, 2026 18:38
…ling it

The recycle drain deadline can expire between the driver's time check and the
socket call. `apply_io_deadline` then returned a TimedOut error for a read or
write it never attempted; the WebSocket reader reported that as a disconnect,
and the next progress call reconnected and replayed. An expired deadline now
bounds the call with the smallest positive socket timeout, so an idle
non-blocking read stays idle and a small write still goes out, while a stalled
write remains bounded.

Found by stressing the bounded-wait recycle test under CPU load, where it
reproduced the CI failure signature with no ACK race in play.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…faults

Review round 1 of the symbol dictionary recycling PR found that a recoverable
fault while a recycle had parked its worker could strand or mislabel a working
sender. Fix each case at the class level, in both progress modes and for
standalone and pooled senders:

- A claim that finds the store terminal after parking drops the parked
  session so its connection closes at once; a claim that finds a periodic-sync
  durability latch after parking hands the session back to a restarted worker
  (new traffic gate, ordinary reconnect with dictionary catch-up), since only a
  worker retries that sync. A worker spawn failure while un-parking marks the
  session terminal.
- The worker parks its session only when a recycle claim asked it to stop; a
  terminal or closing exit drops it, so a terminal sender releases its server
  connection before it is dropped.
- Chunk/Arrow input validation runs only when a recycle is about to be claimed
  or resumed. An armed policy whose claim cannot succeed (undrained queue, link
  down, open deferred group) no longer validates every flush.
- `Sender::must_close()` follows the publication lifecycle for QWP/WebSocket;
  a recoverable `SocketError` (back-pressure timeout, durability latch, storage
  fault during recycling) no longer retires the sender.
- Close with a drained reset that a storage fault interrupted abandons the
  reset inside the queue (topology reservation released, borrowed spare or
  budget returned) and runs the ordinary drained close, releasing the slot at
  close. The queue's own `close` keeps refusing while a resumable reset is
  pending. Manual `drive_once` resumes a parked recycle and always drives
  orphan drainers.
- Reset back-pressure at the drained boundary runs trim-only maintenance
  (never the cadence sync) until the reset can reserve its segment or the
  append deadline passes, sleeping out a deferred trim barrier rather than
  polling, then reports it as the same `SocketError` an append timeout does.
- A failed socket-timeout restore on a peer-reset socket during the bounded
  wait joins the reconnect instead of failing the flush (macOS/BSD return
  EINVAL there).

Tests: the bounded-wait test withholds ACKs through the mock instead of racing
a timer; new coverage for every path above, including a mock fault that resets
the connection after a frame and a hook that latches a durability failure at
the parked claim. Docs for `must_close` updated in Rust, FFI and the C header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant