Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(search_jobs): prevent job state flip-flopping between 'queued' and 'processing'#64098

Merged
stefanhengl merged 1 commit into
mainfrom
sh/search-jobs/fix-queued-state
Jul 29, 2024
Merged

fix(search_jobs): prevent job state flip-flopping between 'queued' and 'processing'#64098
stefanhengl merged 1 commit into
mainfrom
sh/search-jobs/fix-queued-state

Conversation

@stefanhengl

@stefanhengl stefanhengl commented Jul 26, 2024

Copy link
Copy Markdown
Member

Fixes SPLF-170

This fixes a bug in our status reporting where we would report a job as "queued" although it should be reported as "processing". In some cases this led to the state flip-flopping between "queued" and "processing".

This happens, for example, if a worker has just finished a repo-rev job (and set it to completed) but hasn't yet dequeued a new job. In this brief period we reported the entire search job as queued.

Test plan:

  • updated unit test
  • manual testing

I ran the following search job which previously exhibited this behavior and verified that now it doesn't.

context:global r:^github\.com/sourcegraph/sourcegraph$@*refs/heads/* ghp_.+ patterntype:regexp

This fixes a bug in our status reporting where we would report a job as
"queued" although it should be reported as "processing". In some cases
this led to the state flip-flopping several times between "queued" and
"processing".

This happens, for example, if a worker has just finished a job (and set
it to completed) but hasn't yet dequeued a new job. In this brief period
we reported the entire search job as queued.

Test plan:
- updated unit test
- manual testing
@stefanhengl stefanhengl requested a review from a team July 26, 2024 10:15
@cla-bot cla-bot Bot added the cla-signed label Jul 26, 2024
@github-actions github-actions Bot added team/product-platform team/search-platform Issues owned by the search platform team labels Jul 26, 2024
@stefanhengl stefanhengl changed the title fix(search_jobs): report as processing even fix(search_jobs): prevent job state flip-flopping between 'queued' and 'processing' Jul 26, 2024
@stefanhengl stefanhengl merged commit 5d4d003 into main Jul 29, 2024
@stefanhengl stefanhengl deleted the sh/search-jobs/fix-queued-state branch July 29, 2024 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/product-platform team/search-platform Issues owned by the search platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants