You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(knowledge): wait for embedding admission instead of deferring documents for an hour (#7720)
* fix(knowledge): wait for embedding admission instead of deferring documents for an hour
Every embedding batch on the indexing path waited at most five seconds for
the deployment's shared admission bucket. Twenty concurrent documents fanning
out eight batches each queue for minutes behind the configured per-minute
budget, so under load most batches timed out, the document stopped, and it
was re-dispatched with a delay that started at a minute and doubled to an
hour. The bucket's own estimate of when capacity returns was only a floor
under that ladder. During a bulk sync this produced thousands of hour-long
deferrals for a limiter we run ourselves, while the provider was healthy.
The knowledge path now waits up to a minute for admission, which is cheaper
than the re-dispatch it replaces and still bounded by the per-request retry
budget. The request bucket admits 64 concurrent starts instead of 8, so
documents that begin together no longer lose a race for slots while the
token budget sits unused. When an admission wait still expires, the document
resumes after the bucket's stated wait, clamped to 10 to 60 seconds with
jitter, and the yield counts against the processing-slice budget rather than
the provider-failure attempts, since the provider did nothing wrong. The
deadline path now carries the bucket's last stated wait so that estimate is
available to the scheduler.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(knowledge): report only the admission wait still left at the deadline
The bucket's stated wait is stored as an absolute instant so a deadline hit
after a sleep carries the remainder, not the original duration. A test pins
the knowledge admission wait below the retry budget the processing deadline
reserves for each request.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments