You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(query): admin mutations via /v1/admin/query don't invalidate the structured-query cache — stale reads for up to an hour #394
Only the ingest worker ever calls Cache.Invalidate. Admin mutations (DELETE/UPDATE/TRUNCATE/ALTER via /v1/admin/query — the sanctioned mutation path) bump nothing, so /v1/query keeps serving pre-mutation cached rows until TTL expiry.
Detail
internal/ingest/worker.go:488 is the sole Cache.Invalidate caller in the tree.
internal/api/query.go (admin raw-SQL proxy) holds no cache reference.
QueryTimeToTTL allows up to 1h (floor 10s).
Scenario: admin performs a GDPR erasure DELETE FROM users WHERE id = ... via POST /v1/admin/query; POST /v1/query continues returning the deleted rows from LocalCache for up to an hour, with no operator recourse short of restart.
Fix direction
Give the admin-query handler a cache handle and invalidate the affected table(s) after a successful mutation (best-effort table extraction, mirroring the ingest path), or bypass/short-TTL the cache for tables recently mutated.
Found in a repo-wide audit; verified by code trace. Distinct from #382 (ingest-path version race) and #362 (MV writes vs SSE — same "only ingest drives the reactive layer" root cause, different surface).
Activity
coderabbitai commentedon Jul 8, 2026
🔗 Related PRs
#164 - refactor(ingest)!: insert-only pipeline; mutations via /v1/query [closed]
#177 - feat: caching for local table/scope invalidation [closed]
#182 - refactor: full api --> ingest --> clickhouse --> dlq refactor [closed]
#314 - feat(cache): namespace-versioned cache keys for queries and pipes [closed]
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
EricAndrechek commentedon Sep 25, 2026
@/tmp/pr_edits/comment5829323965.md
docs(deployment): write pipes no longer cached; name #394 instead
feat(cache): shared redis cache, snapshot keys, uncached write pipes (#…