Skip to content

fix(udp-server): [#2370] own and drain UDP request processors on shutdown - #2382

Merged
josecelano merged 19 commits into
torrust:developfrom
josecelano:2370-1488-si-15-define-udp-active-request-policy
Sep 30, 2026
Merged

josecelano merged 19 commits into
torrust:developfrom
josecelano:2370-1488-si-15-define-udp-active-request-policy

Conversation

@josecelano

@josecelano josecelano commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements EPIC #1488 SI-15: the UDP receive loop now owns every request processor it spawns and drains them on shutdown.

Before this change the loop kept processors only in a 50-slot AbortHandle ring. When the ring was full, force_push could drop the only handle of up to 48 live processors, so cancellation returned Ok(()) while those processors were still running and still holding the socket. A deterministic regression test reproduced this (48 orphaned processors, 10 of 10 runs).

Now:

  • Every processor is spawned into a loop-owned JoinSet<Result<(), ProcessorError>>. The ring keeps its unchanged overload-eviction decision but no longer owns the tasks. Finished processors are reaped with try_join_next before each spawn.
  • On cancellation the loop stops admitting datagrams, waits up to a private five-second deadline, aborts and joins the rest, and logs one tracing summary with completed, failed, aborted, and evicted counts. The summary is logged at warn if anything failed or was aborted.
  • A receive error aborts and joins every processor before returning the original error.
  • Processor::process_request returns Result<(), ProcessorError> (EncodeResponse, SendResponse).
  • The UDP component still reports Cancelled after a drain, and a receive-loop error still fails it. No metrics or domain events are added.

Changes

  • packages/udp-server/src/server/launcher.rs: JoinSet ownership, drain primitive, shutdown and receive-error paths, and tests.
  • packages/udp-server/src/server/processor.rs: ProcessorError and the Result return.
  • packages/udp-server/src/server/request_buffer.rs: names the capacity ACTIVE_REQUESTS_CAPACITY and adds ADR links; the force_push behavior is unchanged.
  • packages/udp-server/Cargo.toml: tokio time feature, plus test-util for dev only.
  • New package ADR 20260929181216_bound_udp_request_concurrency_with_task_per_request_ring.md: history, alternatives, known trade-offs, and re-evaluation triggers. Linked from the eviction ADR, the ADR index, and the package README.
  • docs/features/shutdown-process/task-inventory.md, EPIC Overhaul: Tracker Shutdown #1488 roadmap row, and a follow-up note in the SI-17 draft.
  • Issue folder: spec progress, manual and benchmark evidence, agent review reports, and implementation retrospective.

Validation

  • cargo test -p torrust-tracker-udp-server: 191 unit, 11 contract, and 1 doc test, with none ignored. cargo test -p torrust-tracker --lib udp passes. Pre-commit and pre-push gates pass.

  • Regression tests, all mutation-proven by reverting the fix in the working tree:

    • The orphaned-processor test is red before the fix and green 10/10 after.
    • A released processor answers before the loop returns.
    • The receive-error path joins every processor.
    • The drain continues after a panic.
  • Throughput (Aquatic UDP load test, five isolated 30 s runs per checkpoint, same machine), mean responses/s:

    • B0 baseline: 159413.39
    • B1 (Result only): 164634.37
    • B2 (JoinSet drain): 167716.20

    There is no regression. Details are in performance-evidence.md.

  • Manual release-binary checks (manual-verification-evidence.md):

    • Idle SIGTERM: exit 0, with the drain reporting 1 active and 1 completed.
    • SIGTERM under Aquatic load (85 evictions): exit 0, with the drain reporting 5 active, 5 completed, and 0 aborted; shutdown took 1.8 ms in-process.
    • An immediate restart rebinds and serves an announce.
    • The standalone example still shows the known SI-17 Ctrl-C panic, which this PR does not change.
  • An independent Task Reviewer report is recorded in agent-review-reports.md. The final verdict is passed, after two rounds of findings that were fixed.

Manual verification used only a temporary .tmp/ copy of the committed benchmark tracker configuration with trace_filter = "info"; no local-only code patches were used.

Also included (docs only, separate commits)

Closes #2370
Part of #1488

Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:15
@josecelano josecelano self-assigned this Sep 30, 2026
@josecelano
josecelano requested a review from da2ce7 September 30, 2026 08:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new documentation misstates the approximate ring as a concurrency and memory bound, and deadline logs omit canonical listener identity.

Review effort: Balanced
Findings: 1 Medium severity · 3 Low severity

Open (4)
What changed in this PR

Adds owned UDP request processing so shutdown drains or aborts every accepted processor before releasing the socket.

Changes:

  • Tracks processors in a loop-owned JoinSet with a five-second shutdown drain.
  • Returns structured processor errors and adds deterministic lifecycle tests.
  • Adds ADRs, operational evidence, and shutdown documentation.
File Description
packages/​udp-server/​src/​server/​request_buffer.rs Names the eviction-ring capacity.
packages/​udp-server/​src/​server/​processor.rs Adds processor result errors and tests.
packages/​udp-server/​src/​server/​launcher.rs Owns, drains, aborts, and joins processor tasks.
packages/​udp-server/​README.md Links UDP design decisions.
packages/​udp-server/​docs/​adrs/​index.md Registers the new ADR.
packages/​udp-server/​docs/​adrs/​20260929181216_bound_udp_request_concurrency_with_task_per_request_ring.md Documents request ownership and eviction design.
packages/​udp-server/​docs/​adrs/​20260907152707_keep_oldest_first_udp_request_eviction.md Cross-links the broader design ADR.
packages/​udp-server/​Cargo.toml Enables Tokio time and test utilities.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​performance-evidence.md Records throughput benchmarks.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​manual-verification-evidence.md Records shutdown verification.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​ISSUE.md Updates implementation and acceptance status.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​implementation-retrospective.md Records implementation lessons.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​b0-tracker.toml Adds benchmark tracker configuration.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​b0-load-test.toml Adds benchmark load configuration.
docs/​issues/​open/​2370-1488-si-15-define-udp-active-request-policy/​agent-review-reports.md Records independent reviews.
docs/​issues/​open/​1488-overhaul-tracker-shutdown/​ISSUE.md Updates the EPIC roadmap.
docs/​issues/​drafts/​1488-si-17-migrate-standalone-udp-environment/​ISSUE.md Records the lifecycle-timeout follow-up.
docs/​features/​shutdown-process/​task-inventory.md Documents owned UDP processor shutdown.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…on shutdown

The receive loop now spawns every request processor into a loop-owned
JoinSet and passes the task's AbortHandle to the unchanged overload ring.
Before, a full ring could drop the only handle of up to 48 live
processors, so cancellation returned while they were still running.

On cancellation the loop drains its processors for up to a private
five-second deadline, aborts and joins the rest, and logs one summary
with completed/failed/aborted/evicted counts. A receive error shuts the
set down before returning the original error. Finished tasks are reaped
with try_join_next before each spawn.

The orphaned-processor regression test is un-ignored, green 10/10 and
mutation-proven; a companion test proves a released processor answers
before the loop returns. Benchmark B2 (mean 167716.20 responses/s)
passes AC11 against B0 and B1.

Refs: torrust#2370
T6 design review of the SI-15 receive-loop slice. Ownership, drop paths,
the receive-error path, log levels and the component outcome needed no
correction. Add ADR and issue markers to the drain primitive, and update
the request-concurrency ADR's affected-code entry, which still described
the shutdown owner as future work.

Refs: torrust#2370
… processors

Update the shutdown task inventory (ownership tree, flowchart, overview
row, UDP instance and request-processor notes, finding 7) now that the
UDP receive loop owns every request processor in a JoinSet and drains
it within five seconds on cancellation. Update the EPIC torrust#1488 roadmap
row with the delivered scope; its status stays Open until close-out.

Refs: torrust#2370
…in after a panic

Extract the receive-error branch into
join_request_processors_after_receive_error and unit-test that it joins
every processor before handing the error back; a real receive error
cannot be produced reliably on loopback and SI-15 adds no production
hooks. Order the drain panic test with a oneshot so a drain that stopped
at a panic fails it. Share one RunningProcessor guard across the drain
and receive-loop test modules. Both new guards are mutation-proven.

Addresses Task Reviewer findings F2, F4, and F13.

Refs: torrust#2370
…nd retrospective

Record executable-boundary verification M1-M4 (clean SIGTERM exits with
reconciled drain summaries and immediate rebind; the known SI-17 example
panic unchanged), the independent Task Reviewer reports (final verdict:
passed), and the implementation retrospective. Document the ring's
known trade-offs in the request-concurrency ADR, the drain summary's
snapshot semantics in the task inventory, and the environment stop-bound
follow-up in the SI-17 draft. Mark T8 and T9 done.

Refs: torrust#2370
Rebasing onto develop rewrote the PR branch's commit ids, so the issue
evidence, review reports and retrospective now cite those commits by
their Conventional Commit subjects instead of stale ids, as the
open-pull-request skill requires.

Refs: torrust#2370
…not simultaneous requests

ACTIVE_REQUESTS_CAPACITY and the ActiveRequests docs claimed at most 50 requests run concurrently. The ring only retains abort handles for overload eviction; handles it drops leave processors running outside it, as the request-concurrency ADR's Known Trade-offs record.

Addresses review-finding:pr-2382-f1.
…ookkeeping, not memory

The request-concurrency ADR said the fixed bound protects memory, contradicting its own Known Trade-offs: live handles the ring drops leave processors running outside it. Describe the ring as bounding its retained abort handles, and word the matching re-evaluation trigger as an approximate bound.

Addresses review-finding:pr-2382-f2.
…ity as service_binding

The new drain start and summary logs recorded the listener under local_addr. The structured runtime logging convention names listener identity service_binding, so rename the helpers' parameter; the value, the binding URL, is unchanged. Existing receive-loop logs keep local_addr, as the issue requires. The manual verification evidence notes that its captures predate the rename.

Addresses review-finding:pr-2382-f4.
…n deadline warning

Every UDP binding drains concurrently on shutdown, but the deadline warning carried no listener identity and runs outside any identifying span, so operators could not tell which binding aborted processors. Pass the service binding into drain_request_processors and log it as service_binding.

it_should_name_the_listener_in_the_deadline_warning captures the warning through the test-helpers log buffer with a unique binding. Dropping the field, or logging the value as local_addr, makes it fail.

Addresses review-finding:pr-2382-f3.
@josecelano
josecelano force-pushed the 2370-1488-si-15-define-udp-active-request-policy branch from a9886aa to b8ef678 Compare September 30, 2026 09:43
Records Copilot review 5363659930 findings F1-F4, all fixed, replied to, and resolved.
…ew fixes

Adds a progress-log entry for findings F1-F4, the rebase onto develop, and the validation run.
…in the spec

Set related-pr to implementation PR torrust#2382, following the SI-14 precedent.
Spec-only PR torrust#2372 stays in the progress log because the v1 field holds
a single value; a follow-up draft proposes allowing several related PRs.

Refs: torrust#2370
The v1 frontmatter related-pr field holds one pull request, but an issue
can have a spec-only PR, an implementation PR, and PRs after a reopen
(issue torrust#2370 already has two). Draft a subissue under EPIC torrust#2264, which
owns the frontmatter contract, and list it in the EPIC's new unordered
Draft Subissue Proposals section so anyone planning the EPIC sees it;
its order in the subissue table is left to the EPIC's planner.

Refs: torrust#2264
Add the standalone issue torrust#2387 specification for making tracker startup
and shutdown logs coherent for operators, with a verbatim baseline
capture of the current lifecycle logs (development configuration, every
service enabled, SIGTERM, exit 0). The maintainer postponed the work
until EPIC torrust#1488 is complete, so the spec is blocked and the baseline
must be recaptured before the inventory. Record the follow-up in the
issue torrust#2370 progress log, where the mixed UDP listener field names came
from Copilot finding F4.

Refs: torrust#2387, torrust#2370
@josecelano

Copy link
Copy Markdown
Member Author

ACK be9a341

@josecelano
josecelano merged commit f911083 into torrust:develop Sep 30, 2026
20 checks passed
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Sep 30, 2026
…closed

Issue torrust#2370 (EPIC torrust#1488 SI-15) was closed as completed when PR torrust#2382
merged. Move its spec folder to docs/issues/closed/, set status done and
the closed spec-path in the spec and its evidence artifacts, tick the
closure checkpoint, and log the archival. Mark EPIC torrust#1488 row 11 Done,
set the task inventory's UDP request-processor roadmap to SI-15
complete, and repair every live reference to the old open/ path (open,
draft, and closed specs' frontmatter and links).

Refs: torrust#2370, torrust#1488
josecelano added a commit that referenced this pull request Sep 30, 2026
c313b94 docs(issues): quote archived issue timestamp (Jose Celano)
f0727af chore(issues): archive closed issue #2370 spec to docs/issues/closed (Jose Celano)

Pull request description:

  Archives the spec for issue #2370 (EPIC #1488 SI-15), closed as completed when PR #2382 merged, from `docs/issues/open/` to `docs/issues/closed/`.

  - Verified issue #2370 is `CLOSED` on GitHub.
  - Moved the spec folder with `git mv`: `ISSUE.md`, evidence, agent review reports, retrospective, and benchmark configurations.
  - Updated frontmatter: `status: done`, closed `spec-path` and `issue-spec` paths, and `last-updated-utc`. Ticked the closure checkpoint and added an archival progress-log entry.
  - EPIC #1488: row 11 is now `Done` and links the closed spec.
  - Task inventory: the UDP request-processor roadmap now reads `SI-15 complete`.
  - Repaired every live reference to the old path, following the skill's search for the bare folder name: open specs (#2387), drafts (SI-9, SI-17, and the #2264 draft), and frontmatter in closed specs (#2149 and its test plans, #2342).
  - Frontmatter validator, markdownlint, cspell, lychee, and the pre-commit and pre-push hooks passed.

  PR #2382 was not linked as the closing PR for #2370, because `Closes #2370` was added by editing the body after creation. The issue was closed by the merge commit message, and an issue comment now records the link.

  Related to #2370
  Part of #1488

ACKs for top commit:
  josecelano:
    ACK c313b94

Tree-SHA512: 3b7299007a42f4b716840e092bd2e4d0a425dde0d14b5ae4f5c79015fdc05b70799a923ecc270b374abc222d9dd8b27f1de40d048c28a3ec6176748e065df075
@josecelano
josecelano deleted the 2370-1488-si-15-define-udp-active-request-policy branch September 30, 2026 13:31

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at be9a34166fa975f6f7ec53533542de273dd3e33f (round 1, post-merge). Recomputed from the bytes at this head.

Label: POST_MERGE_FINDINGS — this PR merged at 2026-09-30T11:42:47Z as f911083d0 before this review was written; nothing below asks for remediation, and process-pr-review § "Reviews Submitted After Merge" governs any follow-up.

The PR's audit record docs/pr-reviews/pr-2382-review/PR-REVIEW.md takes F1–F4 (Copilot's reviewer-provided IDs, kept as audit IDs), so this review's findings continue at F5, written loop F<k>; the record's are record F<k>.

What the PR is. 19 commits 665dde461..be9a34166, 23 files, +2664/−213. Code: launcher.rs +604/−6 (production +150/−6, #[cfg(test)] +454), processor.rs +97/−44 (production +58/−38, tests +39/−6), request_buffer.rs +12/−4 (doc comments and a named constant), Cargo.toml +2/−1. The rest is docs: a new package ADR, the shutdown task inventory, the #2370 spec and evidence, this PR's audit record, and two docs-only riders (#2264 draft, #2387 spec).

Scope, recomputed

Item Result
Ownership Every admitted datagram is spawned into the loop-owned JoinSet<Result<(), ProcessorError>> (launcher.rs:341, :428); finished tasks are reaped by try_join_next before each spawn (:427); the 50-handle ring only decides eviction.
Shutdown biased select: on cancellation the loop stops polling the receiver and drains inside the cancelled arm (:362-368). The deadline is the private constant REQUEST_DRAIN_DEADLINE = 5 s (:73), injectable only for tests (:274). Join under timeout, reap finished, warn! with service_binding, remaining, ?deadline (:101), abort_all, join. The post-abort join is bounded by cooperative cancellation, as with JoinSet::shutdown.
Errors and panics Ok(Err) counts failed (the processor already logged it: encode error!, send warn!); a panic counts failed and is logged (:123); a receive error runs JoinSet::shutdown, then returns the original error (:172, :376). No unbounded wait, and no task outlives the loop on cancellation or receive error. If the owner aborts or drops the loop (states.rs:237, OwnedReceiveLoop::drop), the dropped JoinSet aborts processors without joining them; the inventory and spec T6 say so.
Ring (record F1/F2) request_buffer.rs:6-8, :16-20 now describe retained handles; ADR :60-62 drops the memory claim. The title and three other sentences still claim a bound: loop F5.
Tests Orphan test (:1427) fails against base ownership (48 orphans keep running; base only drops the ring and returns). Completion test (:1452) fails against base (base aborts the ring's handle on return). Drain unit tests use paused time; every await in the loop tests sits under LIFECYCLE_TIMEOUT. Reasoning only; the orchestrator's cargo test at this head is added at posting.
Cargo.toml tokio time (production tokio::time::timeout and Instant) plus dev-only test-util (paused time), with the root manifest's explicit-version pattern (Cargo.toml:94, :113). Features do not enter Cargo.lock, so an unchanged lock is consistent.
Docs Inventory rows, README links, EPIC row 11 and the SI-17 note (DEFAULT_SERVER_LIFECYCLE_TIMEOUT = 5 s, testing/environment.rs:24) match the code. AC1–AC10, AC14 and AC15 hold at the bytes; AC11, AC13 and AC16 rest on recorded runs (B0/B1/B2 means and medians recompute exactly). AC12 does not hold as written: loop F6.
Riders open-pull-request has no PR-scope rule, so the riders are allowed, and the PR body discloses them; both follow the issue frontmatter and folder conventions.
Audit record The 19-field roster and its order match; review IDs, reply targets, severities, resolution subjects (each diff holds its fix) and isResolved all match; the log is chronological. Two grep claims do not reproduce: loop F8.

Copilot threads

ID Claim Fix subject Landed isResolved
F1 constant limits handles, not processors docs(udp-server): [#2370] describe the request ring capacity, not simultaneous requests yes true
F2 ADR claims the ring bounds memory docs(udp-server): [#2370] state that the request ring bounds bookkeeping, not memory yes true
F3 deadline warning lacks the listener fix(udp-server): [#2370] name the listener in the request drain deadline warning yes, for the warning (see loop F7) true
F4 local_addr, not service_binding refactor(udp-server): [#2370] log request drain listener identity as service_binding yes true

Findings

ID Severity Live on develop 86392041d? Recomputation
loop F5 Minor yes The ADR title, Scope, Description and Consequences, plus the index row, claim the ring bounds concurrency; ADR :60-62 and the code deny it. Merged-tree-wrong: yes (stated two ways).
loop F6 Minor yes (docs/issues/closed/…/ISSUE.md:597) AC12, D9 and constraint 6 promise no real sleeps and paused-time deadlines; the receive-loop tests run in real time, as the retrospective records. Merged-tree-wrong: yes.
loop F7 Nit yes The drain's panic error! (launcher.rs:123) has no listener identity.
loop F8 Nit yes Record F1/F2 "no match in the workspace" greps match the record's own quotes.

Checked, no finding: hygiene (19 Conventional subjects; author and committer times ordered; attribution-trailer grep 0 of 19; no banned token in the 23 changed files); no startup_failure or action_required run; no branch commit cited by id (the remaining hex ids are develop, rustc, Aquatic or checksum values); the retrospective follows its template; the three agent-review reports exist and the repository files they name exist; force_push and its tests are byte-identical; the AC6 evicted/aborted split; the 5 s drain fits the 10 s JobManager grace (src/main.rs:37); no later develop commit touches packages/udp-server (first-parent log shows only #2382 and the #2391 archive).

Checks

  • Loop gate on the head worktree: pre-commit-profile gate (pre-commit.sh --format=json) passed, exit 0, 41 s; clippy-allow-reasons --base-ref 665dde461 exit 0; worktree unchanged after the run.
  • cargo test -p torrust-tracker-udp-server at this head: 209 unit, 11 integration and 1 doc test passed, 0 failed (31 s). The lane's reading of the tests above was reasoning only; this is the measured result.
  • CI is not graded post-merge.


<!-- skill-link: create-adr -->

# Bound UDP Request Concurrency With a Task-Per-Request Ring

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor][F5] The ADR title, Scope, Description and Consequences still claim the ring bounds request concurrency; its own body says it does not

Loop F5 (numbered after the record's F1–F4). The ADR states the bound both ways at this head:

  • Claims a bound: the title (line 22) "Bound UDP Request Concurrency With a Task-Per-Request Ring"; Scope line 27 "admits, bounds, and sheds request-processor work"; Description lines 33-34 "it must prevent request work from growing without bound"; Consequences lines 146-147 "has bounded overload handling"; and the docs/adrs/index.md row "Keep bounded task-per-request admission".
  • Denies it: lines 60-62 (record F2's fix) "It does not bound processor concurrency or task memory exactly", and Known Trade-offs lines 123-127 "more than 50 processors can run at once".

The code supports the denial, and goes further than "approximate". launcher.rs:427-428 spawns every admitted datagram unconditionally. request_buffer.rs:121-122 keeps only the last still-active handle once a finished handle precedes the first active one, dropping the rest without aborting them. That drop can recur on any later full-ring insertion whose oldest handle has finished. So the ring bounds only the retained-handle count (50), not running processors, and admission is not bounded at all.

Merged-tree-wrong test: yes, the same rule is stated two ways in one ADR at the head it ships in. Live on develop 86392041d: yes; the ADR and the index are byte-identical there. Post-merge: no remediation is requested here.

- [x] AC9: The UDP component reports `Cancelled` after a drain that finishes within its deadline; a receive-loop error still fails it.
- [x] AC10: `ActiveRequests::force_push` eviction behavior is unchanged and its existing tests pass without modification.
- [x] AC11: At each D6 checkpoint, the mean UDP throughput is not below the lowest run of the checkpoint it is compared with (B1 against B0; B2 against B1 and B0) on the same machine and settings; any drop below it is investigated and explained to the maintainer before continuing.
- [x] AC12: Deterministic tests cover AC3-AC7 without OS signals, real sleeps, or network dependencies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor][F6] AC12 is ticked as "without real sleeps", but the receive-loop tests it relies on run in real time

Loop F6. AC12 (this line), Implementation Constraint 6 (lines 326-328, "No OS signals, real sleeps, external network dependencies, or production test hooks") and D9 (lines 282-284, "paused Tokio time decides when the deadline expires, so no outcome depends on real timing") all promise paused-time, sleep-free tests.

At this head the receive_loop_shutdown tests in launcher.rs are plain #[tokio::test] (lines 1426 and 1451). They wait a real 100 ms SHORT_DRAIN_DEADLINE (line 1237) and poll rebind with tokio::time::sleep(BIND_RETRY_INTERVAL) in wait_until_bindable (lines 834-842). These are the tests cited by AC4's evidence (line 653) and AC7's cancellation evidence (line 656).

The deviation is acknowledged in implementation-retrospective.md lines 55-62 and in AC12's own evidence row (line 661, "D9 real-time deviation recorded"). So the spec states the test rule two ways, and it ticks an AC whose text is not met.

Reading the tests, their outcomes look gate-decided rather than timing-decided. That is reasoning only; the orchestrator's cargo test at this head is reported at posting.

Merged-tree-wrong test: yes (rule stated two ways; a ticked AC false as written). Live on develop 86392041d: yes, at docs/issues/closed/2370-1488-si-15-define-udp-active-request-policy/ISSUE.md:597. The #2391 archive changed only the status, path, checkpoint and log lines.

Err(error) if error.is_cancelled() && aborted_by_drain => outcome.aborted += 1,
Err(error) if error.is_cancelled() => outcome.evicted += 1,
Err(error) => {
tracing::error!(target: UDP_TRACKER_LOG_TARGET, %error, "UDP request processor failed during shutdown drain");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nit][F7] The drain's panic log still has no listener identity

Loop F7. Record F3/F4 put service_binding on the drain-start, deadline and summary logs. This tracing::error! is emitted once per panicked processor from the same drain_request_processors, yet it carries only %error.

No enclosing span supplies the listener either. run_udp_server_main's #[instrument] (line 329) records only cookie_lifetime, connection_id_validation and request_drain_deadline, and the receive-loop task is spawned without an instrumented parent span (line 293).

With several UDP bindings draining at once (the situation record F3 describes), a panic line can be attributed to its listener only indirectly, through the per-listener failed count in that listener's summary.

Live on develop 86392041d: yes; packages/udp-server is unchanged between this head and develop.

overload eviction, and says it is not an exact limit on running processors. The
`ActiveRequests` struct doc made the same false claim ("at most 50 requests are handled
concurrently"), so the same commit corrects it. The ring's behavior is unchanged (D8).
- Current-tree verification: `handled simultaneously|at most 50|handled concurrently` has no

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nit][F8] The record F1 and F2 current-tree greps do not reproduce at this head

Loop F8. Lines 75-76 state that handled simultaneously|at most 50|handled concurrently "has no match in the workspace", and line 95 says the same of protects memory.

At be9a34166, git grep -n -E for the first pattern matches this file's lines 73 and 75. protects memory matches lines 82, 88 and 95, and the #2370 spec's line 575. Every match is the record or the spec quoting the removed text.

The substantive claim holds: no code comment or ADR sentence makes either claim at the head. Only the literal evidence line fails as written; scoping the grep to code and ADRs would make it reproduce.

Live on develop 86392041d: yes. The record is unchanged, and the spec line is at docs/issues/closed/2370-1488-si-15-define-udp-active-request-policy/ISSUE.md:575.

This branch was previously deployed

1 inactive deployment
coverage — be9a3416 Deployed Sep 30, 2026 by josecelano via Generate Coverage Report #2375
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.

Define UDP active-request shutdown policy

3 participants