This repository was archived by the owner on Sep 30, 2024. It is now read-only.
[Backport 5.2] Embeddings: fail job immediately if rate limited exceeded#58939
Merged
Conversation
Usually, during an embeddings job we allow 10% of embedding requests to fail, simply skipping over failed chunks. If a customer has hit their rate limits, this means we might continually send a huge number of embedding requests that we know will immediately fail. With this change, we immediately fail a job if the rate limit is exceeded. It also increases the amount of time between attempting to run a job to 15 minutes. This won't make a big difference to user experience, since by default embeddings jobs aren't allowed to be scheduled within 24h of the last run. But it helps prevent jobs from continuously being scheduled then failing. This change is unlikely to have a user-facing impact, but just helps cut down on noise in logs and excessive requests to Cody Gateway.
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 021f43a...789532c.
|
Contributor
jdpleiness
approved these changes
Dec 13, 2023
Closed
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.
Usually, during an embeddings job we allow 10% of embedding requests to fail,
simply skipping over failed chunks. If a customer has hit their rate limits,
this means we might continually send a huge number of embedding requests that
we know will immediately fail. With this change, we immediately fail a job if
the rate limit is exceeded.
It also increases the amount of time between attempting to run a job to 15
minutes. This won't make a big difference to user experience, since by default
embeddings jobs aren't allowed to be scheduled within 24h of the last run. But
it helps prevent jobs from continuously being scheduled then failing.
This change is unlikely to have a user-facing impact, but just helps cut down
on noise in logs and excessive requests to Cody Gateway.
Backport for https://github.com/sourcegraph/sourcegraph/pull/58869
Test plan
Added new unit test