Skip to content

Allow updating the pulse sink reaper at runtime#1294

Merged
milos-lk merged 1 commit into
mainfrom
hot-conf-reaload-reaper
Jul 13, 2026
Merged

Allow updating the pulse sink reaper at runtime#1294
milos-lk merged 1 commit into
mainfrom
hot-conf-reaload-reaper

Conversation

@milos-lk

Copy link
Copy Markdown
Contributor

Follow-up to #1289, addressing the review comment about updating the reaper config after service start. The monitor previously snapshotted pulse_sink_reap_grace_sec once in NewMonitor and only started the reaper goroutine if reaping was enabled at boot, so the grace could not be tuned and reaping could not be enabled or disabled without a restart.

The reaper goroutine now always runs and re-reads the grace (an atomic.Duration on the monitor) every tick. Monitor.SetPulseSinkReapGraceSec lets embedders apply an updated value on a live service: positive values take effect on the next tick, non-positive disables reaping. While disabled, the loop skips pactl entirely and clears its orphan tracking, so re-enabling starts a fresh grace period instead of instantly reaping sinks tracked before the flip. Config semantics are unchanged (0 = default, negative = disable).

Follow-up to #1289, addressing the review comment about updating the reaper config after service start.
The monitor previously snapshotted pulse_sink_reap_grace_sec once in NewMonitor and only started the reaper goroutine if reaping was enabled at boot, so the grace could not be tuned and reaping could not be enabled or disabled without a restart.

The reaper goroutine now always runs and re-reads the grace (an atomic.Duration on the monitor) every tick. Monitor.SetPulseSinkReapGraceSec lets embedders apply an updated value on a live service: positive values take effect on the
next tick, non-positive disables reaping. While disabled, the loop skips pactl entirely and clears its orphan tracking, so re-enabling starts a fresh grace period instead of instantly reaping sinks tracked before the flip. Config semantics are unchanged (0 = default, negative = disable).
@github-actions

Copy link
Copy Markdown
Contributor

AV-sync stats summary: view in run #29249565002

@milos-lk
milos-lk merged commit 07e07ca into main Jul 13, 2026
18 checks passed
@milos-lk
milos-lk deleted the hot-conf-reaload-reaper branch July 13, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants