Revert "Revert "feat(web): serve /usage analytics from Postgres replica"" - #5229
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental re-review of the new commits (dedicated usage-replica pool on Files Reviewed (4 files)
Previous Review Summary (commit 8d6b79d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 8d6b79d)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryRe-lands the Snowflake→Postgres replica migration for /usage analytics (unchanged from #5223); the only finding is a case-sensitive test assertion that cannot catch the regression it guards against. Overview
Issue Details (click to expand)SUGGESTION
Notes: scope/SQL changes were verified against Fix these issues in Kilo Cloud Files Reviewed (2 files)
Reviewed by kimi-k3 · Input: 117.8K · Output: 2.8K · Cached: 135.5K Review guidance: REVIEW.md from base branch |
Route usage analytics aggregates through POSTGRES_REPLICA_EU_URL_2 so they do not share the standard readDb pool. Keep org/user lookups on readDb. Make the self-view IS NULL guard case-insensitive. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
…23-chrarnoldus/usage-analytics-postgres # Conflicts: # apps/web/src/lib/drizzle.test.ts # apps/web/src/routers/usage-analytics-router.ts
Reverts #5228