server: add pool-max-blocked fields to pending_resources API#2209
Open
server: add pool-max-blocked fields to pending_resources API#2209
Conversation
39c6703 to
895cc68
Compare
1ae161b to
28e23c4
Compare
diptanu
approved these changes
Mar 6, 2026
| let app = state.indexify_state.app_state.load(); | ||
| let pending = app.indexes.get_pending_resources().clone(); | ||
| Ok(Json(pending.into())) | ||
| let pending = app.indexes.get_pending_resources(); |
Collaborator
There was a problem hiding this comment.
Lets add a timer here to understand how long this takes in production
114ad80 to
e89c164
Compare
When a function pool hits max_containers, the /internal/pending_resources API now reports only scalable demand (total - blocked-by-max) so the external autoscaler does not provision executors that can never take work. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e89c164 to
460748c
Compare
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.
Summary
max_containers, pending runs in those pools are now excluded from thefunction_runsandsandboxeshistograms in/internal/pending_resourcessubtract()method toResourceProfileHistogramandcompute_blocked_by_pool_max()inbuffer_reconciler.rsto compute blocked counts on-the-fly at request timefunction_pool_deficits/sandbox_pool_deficitsare unchangedTest plan
test_function_runs_blocked_by_pool_maxandtest_sandboxes_blocked_by_pool_maxcargo +nightly clippy— cleancargo +nightly fmt— cleanjust check-rust— passes🤖 Generated with Claude Code