Skip to content

loop: the drain on request (SIGUSR1); no page says the loop sends - #259

Merged
rusholme merged 2 commits into
mainfrom
loop-drain/1-docs
Dec 5, 2026
Merged

rusholme merged 2 commits into
mainfrom
loop-drain/1-docs

Conversation

@rusholme

@rusholme rusholme commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

What and why

This is the documentation of the loop's drain on request, Caltech-IPAC/rapid pull request "loop: drain on request (SIGUSR1)" (branch loop-drain/1-drain), and the correction of every page that still says the loop sends packet sets. The loop stopped sending with rapid PR 680.

  • system/loop.md: a new section, Draining on request. It covers what SIGUSR1 does, how to send it to a process and to a systemd unit's main process alone (systemctl --user kill --kill-whom=main --signal=USR1 <unit>, with the loop execed as the unit's main process), that the loop exits 2 (1 with a failed job), and that SIGTERM, SIGINT and run stop still end work at once. The exit-code table gains the 2 row. The opening, "In plain terms", "One pass" and its item 6, and --local now say what the code does: a pass sends nothing, each packet job sends its own set, and rapidpipe publish --run beside the loop is the recovery sweep with its SETTLE_S (3,660 s) window and its waiting, held and late fields. The old item 6 named a 300 s window and the fields sets_waiting and sets_late, which do not exist. The two measurements of a publishing pass are kept, marked as of then.
  • system/tool.md: the exit table's 2 row and the loop entry name the drain.
  • system/migration.md line 48 and system/index.md line 35: no longer "each pass ending at the Kafka sweep" or "to the Kafka recovery sweep".
  • system/foundation.md line 1697: the 2026-10-23 Kafka pace is kept and marked as of when the loop published.

Divergences

  • The card puts the runbook's row for this item in "as COMMON.md says". That row goes in a separate rapid runbook pull request, docs/foundation-smdc-step.md.

Session notes

  • None.

🤖 Generated with Claude Code

loop.md gains "Draining on request": what SIGUSR1 does, how to send it to
a process and to a systemd unit's main process alone
(systemctl kill --kill-whom=main --signal=USR1), exit 2, and that
SIGTERM, SIGINT and run stop still end work at once. The tool page's exit
table and loop entry name it.

Every statement that the loop sends packet sets or sweeps is corrected to
what the code does since rapid 680 (loop.md's opening, plain terms, one
pass and item 6, --local; migration.md; index.md); the measurements of
the publishing loop are kept, marked as of then (loop.md, foundation.md).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rusholme
rusholme merged commit 561071e into main Dec 5, 2026
1 check passed
@rusholme
rusholme deleted the loop-drain/1-docs branch December 5, 2026 04:08
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