Skip to content

fix(den): index connector sync event status lookup - #3624

Open
OmarMcAdam wants to merge 1 commit into
devfrom
fix-db-connector-sync-read
Open

fix(den): index connector sync event status lookup#3624
OmarMcAdam wants to merge 1 commit into
devfrom
fix-db-connector-sync-read

Conversation

@OmarMcAdam

Copy link
Copy Markdown
Collaborator

Summary

  • Add a composite connector_sync_event(connector_target_id, status) index for the GitHub sync worker hot lookup.
  • Keep the Drizzle schema and generated migration metadata in sync.

Root Cause

  • processDueGithubSyncEvents() runs every 5 seconds by default and checks for a running sync event per queued connector target.
  • The existing table only had separate connector_target_id and status indexes, so PlanetScale could read/filter very large row sets for connector_target_id = ? and status = ? limit ?.

Verification

  • pnpm --filter @openwork-ee/den-db test
  • pnpm --filter @openwork-ee/den-api build

No testkit tape: this is a schema-only performance/index change with no user-facing runtime flow.

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview Aug 7, 2026 5:16pm
openwork-den Ready Ready Preview Aug 7, 2026 5:16pm
openwork-den-worker-proxy Ready Ready Preview Aug 7, 2026 5:16pm
openwork-landing Ready Ready Preview, v0 Aug 7, 2026 5:16pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
openwork-diagnostics Skipped Skipped Aug 7, 2026 5:16pm

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (a07e3f13b5a96109ae83243bc831c2ccae6949a7). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

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.

1 participant