v0.8.32: connectors fixes, search optimizations - #7733
Merged
Conversation
Every document run checked the payer's spend by summing the usage ledger for the billing period. The ledger grows with every indexed document, so a bulk connector sync re-read the whole period's ledger once per document: 41,000 sums over roughly 436,000 rows each during one crawl, which was the largest single database consumer while it ran and slowed unrelated queries, including search. Background ingestion now reads the gate through a per-process LRU cache keyed by payer, billing period and acting member, with a 60-second TTL and coalesced misses. Staleness fails in the harmless direction: a payer at their limit indexes for at most another minute, and a raised limit takes at most a minute to apply. Interactive callers keep reading the gate fresh. Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…lane (#7726) * fix(search): reserve interactive embeddings from their own admission lane A search embeds its query through the same per-credential admission bucket as bulk indexing, so during a crawl one short interactive request competed with hundreds of batches for the bucket's refill. Non-checkpointed callers now reserve from a separate lane under the same identity; the provider cooldown and quota gates stay shared, so a provider 429 or an exhausted balance still pauses every caller. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn * fix(search): cap the bulk embedding lane below the credential budget Every caller reserves from the credential's aggregate buckets, and the bulk lane additionally reserves from a bucket capped at 90% of that budget. The aggregate can no longer exceed the configured budget, and interactive callers always find headroom instead of a queue behind a crawl's batches. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn * fix(search): keep a bulk lane bucket large enough for one valid reservation At the smallest supported budgets the 90% share floored below a single request or token cost and locked the bulk lane. The bucket now holds at least the reservation it is asked for, while the refill rate keeps the share. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBacX6HGVhPMUySuMfANwn * refactor(search): derive the bulk admission lane from one flag A single bulk flag now selects the shorter admission wait and the capped lane, the lane cap is a pure function of configuration, and a bulk batch larger than that cap is rejected up front instead of resizing a shared bucket. Tests use the shared env mock. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* fix(search): verify Atlassian access and clarify source setup * fix(search): close authorization races and repair integration fixtures
Contributor
|
Too many files changed for review (117 files, 100 file limit). Bypass the limit by tagging |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.