Skip to content

Close File Search sync runs a stopped worker left open (#1383) - #1417

Merged
helpcodeai merged 2 commits into
mainfrom
fix/file-search-stale-runs
Nov 1, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
fix/file-search-stale-runs

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Seen on the Cloud after today's deploys: the connector's Recent syncs showed two runs (14:08 and 15:00 UTC) stuck on Running for hours. A deploy (or a crash, or the memory limit) stopped the worker mid-sync, and nothing ever finished those rows.

Changes

  • On start, files-worker first marks every running sync run as partial, with the note "Interrupted: the File Search worker restarted. The sync continues on its own.". It does this only when no live worker holds the source's lease, so several workers never close each other's runs. Then the scheduler starts.
  • The sync itself continues as before: progress is stored per file.
  • Never blocks or fails the start; an error is logged.

Cloud and self-hosted alike.

Type

  • Bug fix

Testing

  • Added/updated unit tests
Directory Command Result
packages/backend npx tsc --noEmit -p tsconfig.json clean
packages/backend npx jest src/ee/file-search/files-worker.service.spec.ts 2 passed
packages/backend npm run lint 0 errors, 11 warnings (existing)

Related Issues

Relates to #1383, #1379.

After a deploy the Files panel showed two syncs 'running' for hours: the
killed worker never finished their rows. On start, files-worker marks
running runs as partial unless a live worker holds the source's lease.
@helpcodeai
helpcodeai merged commit a1cc037 into main Nov 1, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the fix/file-search-stale-runs branch November 1, 2026 17:40
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant