Skip to content

fix: config watcher: avoid excessive wakes - #417

Merged
ethanpailes merged 1 commit into
masterfrom
fix-agressive-watch-logging
Aug 24, 2026
Merged

fix: config watcher: avoid excessive wakes#417
ethanpailes merged 1 commit into
masterfrom
fix-agressive-watch-logging

Conversation

@ethanpailes

Copy link
Copy Markdown
Contributor

Issue Link

n/a just noticed this

AI Policy Ack

Ack

This PR was:

  • mostly or completely vibe coded
  • mostly or completely meat coded
  • bit of both

I wrote the core of the change and used gemini to get the tests passing, plus do some pre-post code review.

Description

This patch switches the config watcher from watching the nearest parent if one of the config file paths does not exist to polling for the existance of the files every 5s instead.

Previously, if the config file didn't exist and the parent path changed frequently, we would wind up super agressively polling. In particular, when I accidentally passed -c /tmp/config.toml but config.toml did not exist, in just a few seconds I created 1.7 million log lines at a debug log level. That's way to much and shpool should never be that chatty. This gets us to chill out a little while still picking up new configs in a pretty reasonable amount of time.

@ethanpailes
ethanpailes requested review from Aetf and maxhbooth August 21, 2026 22:44
@ethanpailes
ethanpailes force-pushed the fix-agressive-watch-logging branch from 7d4f615 to 3f7726b Compare August 21, 2026 22:45
This patch switches the config watcher from watching the
nearest parent if one of the config file paths does not
exist to polling for the existance of the files every 5s
instead.

Previously, if the config file didn't exist and the parent
path changed frequently, we would wind up super agressively
polling. In particular, when I accidentally passed -c /tmp/config.toml
but config.toml did not exist, in just a few seconds I created
1.7 million log lines at a debug log level. That's way to much
and shpool should never be that chatty. This gets us to chill
out a little while still picking up new configs in a pretty reasonable
amount of time.
@ethanpailes
ethanpailes force-pushed the fix-agressive-watch-logging branch from 3f7726b to db7ea58 Compare August 21, 2026 23:03
@ethanpailes
ethanpailes merged commit 2def275 into master Aug 24, 2026
12 checks passed
@ethanpailes
ethanpailes deleted the fix-agressive-watch-logging branch August 24, 2026 15:15
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.

2 participants