Skip to content

feat: runtime reload of rules#33

Merged
akos011221 merged 1 commit into
mainfrom
feat/sighup-rules-reload
Mar 12, 2026
Merged

feat: runtime reload of rules#33
akos011221 merged 1 commit into
mainfrom
feat/sighup-rules-reload

Conversation

@akos011221
Copy link
Copy Markdown
Owner

SIGHUP handler for reloading rules without restarting the dataplane. Stats thread re-parses the rules file, it builds a new rule table and per-worker stats arrays, then swaps the pointers with 1s grace period.

Moved the rule table from stack to heap so we can free the old rule table and replace it with a new one.

swap process: build new table -> update each worker's pointer -> sleep 1s (grace period) -> free old table.

to test it:
kill -HUP $(pidof upe)

SIGHUP handler for reloading rules without restarting the dataplane. Stats thread re-parses the rules file, it builds a new rule table and per-worker stats arrays, then swaps the pointers with 1s grace period.

Moved the rule table from stack to heap so we can free the old rule table and replace it with a new one.

swap process: build new table -> update each worker's pointer -> sleep 1s (grace period) -> free old table.

to test it:
@akos011221 akos011221 merged commit 7949510 into main Mar 12, 2026
1 check 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