Repository navigation
Close File Search sync runs a stopped worker left open (#1383) - #1417
Merged
Merged
Conversation
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
enabled auto-merge (squash)
November 1, 2026 17:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
files-workerfirst marks everyrunningsync run aspartial, 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.Cloud and self-hosted alike.
Type
Testing
packages/backendnpx tsc --noEmit -p tsconfig.jsonpackages/backendnpx jest src/ee/file-search/files-worker.service.spec.tspackages/backendnpm run lintRelated Issues
Relates to #1383, #1379.