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

insights: better scheduler implementation for executing searches #18308

@emidoots

Description

@emidoots

Right now the Code Insights background workers will enqueue search queries to be executed at a given interval, and we enforce that the timeout on searches is below that interval to promise the queue does not grow unbounded (e.g. if a search takes longer than the interval we enqueue at).

https://github.com/sourcegraph/sourcegraph/pull/18267#discussion_r576237553

This could be improved by adding backpressure such as through only enqueuing new insights from the enqueuer, and having the worker itself enqueue the next job.

Metadata

Metadata

Assignees

Labels

backendAny issue that needs work in the backend to closecode-insightsIssues related to the Code Insights productnice-to-have

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions