Skip to content

fix(agent): time-driven retention expiry — stale empty vhost shadowed ODCDS - #167

Merged
bpalermo merged 1 commit into
mainfrom
fix/retention-prune-steady-state
Jun 12, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/retention-prune-steady-state

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Found during the SAN+multi-key e2e: svc-4's pods moved off worker-03 mid-roll → service left the node's dep set → retained empty (90s 404-protection grace) → no further watch events under scoped watches → never pruned → the stale vhost shadowed the *.aether.internal catch-all and every svc-4 request from that node fast-503'd indefinitely.

Fix: the refresher's 1-minute prune tick (added for ODCDS TTLs) now also signals a reload when any retained entry outlives the grace. Regression test reproduces the steady-state sequence.

🤖 Generated with Claude Code

… ODCDS

Retention pruning was reload-driven, which every-node-everything made
invisible: some event always arrived within the grace. Under
demand-scoped watches a node receives NO events once a service leaves
its dependency set, so the retained empty cluster/vhost was never
pruned — and because the vhost still matched, requests got its empty
cluster's fast 503 forever instead of falling through to the on-demand
catch-all (in vivo 2026-06-12: svc-4's pods moved off worker-03 during
a roll; the node served 503s for svc-4 indefinitely).

The refresher's existing prune tick now also checks retained entries
against the grace and triggers the pruning reload. Worst-case stale
window = retention grace + tick interval (~2.5min), after which the
service is cold-path reachable again.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@bpalermo
bpalermo merged commit b047281 into main Jun 12, 2026
9 checks passed
@bpalermo
bpalermo deleted the fix/retention-prune-steady-state branch June 12, 2026 23:25
bpalermo added a commit that referenced this pull request Jun 13, 2026
… in-scope churn only (#168)

The 90s retention grace + 60s prune tick left a worst-case 2.5-minute
window where a service that left the node's dependency set kept a
stale empty vhost shadowing the on-demand catch-all (fast 503s, #167).

Retention conflated two cases. In-scope transient emptiness (a
destination mid-churn) keeps the grace: fast retriable 503s beat ODCDS
stalls until the endpoints return. A service that LEFT the dependency
set is now dropped in the same reload that processes the departure:
post-FQDN its authority cannot 404 — the *.<mesh-domain> catch-all is
the structural backstop — so the vhost's only effect was suppressing
the designed recovery path. Next request re-warms it as an observed
dependency (~600ms once), which is the truthful state for traffic
nobody on the node declares.

Convergence for the departure case: zero stale window (was up to
2.5min). The #167 tick remains as backstop for in-scope-but-extinct
services.

Co-authored-by: Claude Opus 4.8 <[email protected]>
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