Skip to content

fix(server): validate config, preserve reload state, and drain requests - #17

Merged
kclaka merged 1 commit into
loadgen-rate-limitsfrom
config-reload-safety
Sep 16, 2026
Merged

kclaka merged 1 commit into
loadgen-rate-limitsfrom
config-reload-safety

Conversation

@kclaka

@kclaka kclaka commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Invalid policies could panic, ignored capacity changes could take effect on later reloads, and policy changes reset bench mode. Validate configuration before use, provide upstream defaults for partial files, preserve effective restart-only settings and mode, and retain the active cache when a reload is invalid. Existing invalid startup files now fail clearly instead of silently using defaults.

Watch the parent directory so atomic file replacement and later file creation are detected, and keep the watcher owned by main. Wait for both HTTP servers to drain; previously the idle metrics server could finish first and drop active proxy requests.

Validation: 56 Rust tests (including the prerequisite), including four configuration regressions; cargo fmt; strict Clippy across all targets. Combined end-to-end smoke checks exercised atomic reloads, consecutive rejected capacity changes, invalid reload preservation, and SIGTERM while a request was in flight.

This PR is stacked on #14 because the current CI Rust compiler rejects the original load-generator division code. Merge #14 first; the diff here contains only this improvement family.

Replaces #10 after removing the codex/ branch prefix. Commit contents are preserved; the original PR retains prior discussion and review history.

@kclaka
kclaka merged commit ed1a4f1 into loadgen-rate-limits Sep 16, 2026
4 checks passed
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