Skip to content

fix(router): diff file/manifest watcher reloads to reuse unchanged graph muxes#17

Open
arutkowski00 wants to merge 1 commit into
monday-tweaksfrom
feature/adamru/incremental-watcher-reload
Open

fix(router): diff file/manifest watcher reloads to reuse unchanged graph muxes#17
arutkowski00 wants to merge 1 commit into
monday-tweaksfrom
feature/adamru/incremental-watcher-reload

Conversation

@arutkowski00

Copy link
Copy Markdown
Collaborator

Summary

  • File and manifest watcher hot-reload paths now populate routerconfig.Response.Changes and Hashes, matching the CDN split-config poller behavior
  • Router tracks per-graph hashes across reloads so graph_server can reuse unchanged base/FF muxes instead of rebuilding all graphs on every watcher event
  • Gated behind mondaytweaks.IncrementalWatcherReload (defaults to true)

Root cause

Watcher callbacks passed routerconfig.Response{Config: cfg} with Changes/Hashes nil, forcing needNewBaseGraphMux = true and skipping FF-mux reuse. Every reload rebuilt the base mux and all ~60 feature-flag muxes even when only one variant changed, leaving large freed-but-unreturned RSS spikes.

Test plan

  • go test ./pkg/routerconfig/... -run 'TestDiffGraphHashes|TestGraphHashesChanged|TestComputeGraphHashesFromConfig'
  • go test ./router-tests/protocol/... -run 'TestConfigHotReload'
  • Goroutine dump during single-variant manifest reload shows buildGraphMux count ≈ 1 (not ~60)
  • Memory-ramp benchmark shows per-reload RSS step drops proportionally

…aph muxes

Populate routerconfig.Response Changes/Hashes on watcher hot-reloads so
graph_server can reuse feature-flag muxes instead of rebuilding all ~60
graphs on every reload when only one variant changed.
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Router-nonroot image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/mondaycom/cosmo/router:sha-6d4a0ccc682f53359a690dd15b69236f1f816bfc-nonroot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant