Repository navigation
perf(notifications): add opt-in concurrent history backfill - #445
Conversation
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit details: You’ve used the included review currently available. This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Final review: current main is already included, no unresolved review threads, and all CI checks plus the Vercel preview and Greptile review passed. Reviewed bounded concurrency, disjoint source groups, draining failed work before checkpointing, deterministic ordering, and resumability. Production source classification is complete; conversation materialization is still running with providers paused. The private production-data rehearsal completed with zero verifier drift across all 10 organizations. Local full verification reached the analytics line-plot suite and hit a Bun SIGTRAP; a subsequent isolated attempt was blocked by the local Postgres service stopping. CI unit/integration and both E2E suites passed. CodeRabbit rate limiting is not a gate per the requested review policy. |
|
Merged and deployed to production at https://orbit.noveum.ai (deployment dpl_4u2cDqdrKWhcV1T5AiiwH6mShaBH, READY). Fixed a rollout configuration gap by adding the existing Slack app ID to Vercel production and preview. Live Slack channel lookup succeeds and member synchronization succeeds, currently matching 8 of 10 members. Historical source classification is complete; conversation materialization remains in progress. Grouped reads remain disabled and providers remain paused until backfill completion and a zero-drift production verifier result. Historical unresolved delivery destinations have not been reset for resend. |
Summary
Add --source-concurrency=1..8 to the notification history backfill, defaulting to serial execution. Resolve and classify independent source groups in bounded windows. Drain started work before reporting failure, preserve cursor ordering and complete equivalence groups, and reject overlapping groups before classification. Other phases remain sequential. Document the restart and rollout procedure.
Evidence
The production rollout was spending roughly half a second per database round trip. The serial source phase was the main bottleneck.
Rollout
PR #443 is already merged and deployed. The authorized production backfill has resumed from its saved checkpoint using the rehearsed eight-worker Node bundle. Provider delivery and grouped reads remain paused until production verification returns zero drift. No schema migration is introduced by this PR.
Greptile Summary
The PR adds opt-in bounded concurrency to notification source resolution and classification while preserving serial execution by default.
sourceConcurrencyfrom the service API through the CLI.Confidence Score: 5/5
The PR appears safe to merge with no actionable correctness or security defects identified in the changed paths.
The bounded-window implementation validates concurrency, preserves seed-order cursor advancement, prevents overlapping groups from being applied concurrently, drains started operations on failure, and retains resumable checkpoint behavior.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Read ordered source seeds] --> B[Split into bounded windows] B --> C[Resolve every seed in window concurrently] C --> D{Any resolution failed?} D -- Yes --> E[Drain window and report failure] D -- No --> F[Build complete source groups in seed order] F --> G{Next group exceeds batch bound?} G -- Yes --> H[Defer group without advancing past it] G -- No --> I[Add or merge group and advance cursor] I --> F H --> J[Reject overlapping notification IDs] F --> J J --> K[Apply independent groups concurrently] K --> L{Every started transaction succeeded?} L -- No --> M[Drain work and preserve prior checkpoint] L -- Yes --> N[Persist ordered cursor and processed count]Reviews (1): Last reviewed commit: "perf(notifications): bound concurrent hi..." | Re-trigger Greptile