improvement(db): reduce connection saturation and egress hotspots#4594
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Optimizes MCP endpoints ( Updates Copilot workspace VFS task materialization to compute Reviewed by Cursor Bugbot for commit 631e60f. Configure here. |
Greptile SummaryThis PR addresses connection saturation and egress hotspots through three targeted changes: halving the postgres-js pool
Confidence Score: 5/5Safe to merge — all three changes are well-scoped optimizations with no behaviour regressions. Pool reduction is purely a config tuning backed by production metrics. Both MCP workspace-scoping changes move an existing JS filter into SQL with the empty-array edge case correctly handled by pre-existing early returns. The copilot VFS SQL projection preserves pre-PR semantics: role/content operators (->> / ->) are used correctly, and COALESCE guards cover NULL and empty-array column states. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix(vfs): guard jsonb_array_elements aga..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
|
@cursor review |
|
@greptile |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 631e60f. Configure here.
Summary
maxfrom 30 → 15 in@sim/dband realtime app (validated against 24h PlanetScale Insights: 3.5 avg fleet concurrency, 25× headroom on steady state, 2.5× under 10× burst)workflow_blocksagent query to workspace in MCP refresh + stored routes (eliminates ~88 GB/day egress from cross-tenant scan)copilot_chats.messagesSQL-side in workspace VFS materializer (eliminates ~58 GB/day egress; semantically identical to prior JS-side filter)Type of Change
Testing
Tested manually. Validated:
bun run check:api-validationpassesbun run type-checkpasses (no errors)serializeTaskChatconsumesinArrayguarded by existingworkflowIds.length === 0early returnChecklist