Skip to content

Batch routing-slot cache invalidation - #462

Merged
matrixarkai merged 2 commits into
mainfrom
perf/batched-slot-invalidation
Nov 21, 2026
Merged

matrixarkai merged 2 commits into
mainfrom
perf/batched-slot-invalidation

Conversation

@matrixarkai

Copy link
Copy Markdown
Owner

Change

Invalidate selected routing slots in one tier-key walk per cache shard instead of repeating the walk for each slot. Deduplicate the selection, preserve exact slot-prefix and logical-shard boundaries, and keep the single-slot API as a wrapper. Empty selections perform no storage I/O.

Use the existing removal loop unchanged after selection, including value-bearing eviction callbacks, keyed order removal, pin cleanup, SSD deletion, invalidation counters and callback draining before reporting a manifest error.

Validation

Focused library tests in both storage configurations cover tier contents and order, selected-key scan counts, duplicate/empty slots, exact selector boundaries, sharded removal, hot-value callbacks and storage-index invariants. The file-backed configuration also injects a manifest publication failure and verifies removed values still reach the callback.

No customer settings, cache-key layout, persistence format, CI policy or ignored-test changes. This change does not claim end-to-end maintenance latency acceptance or a full-suite pass.

@matrixarkai
matrixarkai merged commit bcf26e1 into main Nov 21, 2026
6 of 7 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.

2 participants