[Invoker] Wire up ReservedResource to replace the old Permit#4649
[Invoker] Wire up ReservedResource to replace the old Permit#4649AhmedSoliman wants to merge 8 commits intomainfrom
Conversation
I'm not loving this, but it works well enough to unblock.
NOTE: sys_user_limits is a *stub* table, the shape and contents of this table will almost definitely change in the very near future. Consider this as a placeholder until scope+limit-keys are wired up completely.
Expose vqueue entries as a single DataFusion table with stage-aware scanning. When the query filters `stage`, only matching stage key kinds are scanned; without a stage filter, all inbox stages are scanned and merged. Also project the latest entry metadata for observability (status plus EntryStatistics timestamps and counters), and add targeted tests for stage predicate extraction and sys_vqueues stage filtering behavior.
Baby steps towards unification and changing the ownership model of the invoker
With this change, user-limits acquisition correctly tracks the lifecycle of the invocation state machine on the invoker.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6bd1d192b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if self | ||
| .notified_head | ||
| .is_some_and(|notified| notified == vqueue) | ||
| { | ||
| return Poll::Pending; |
There was a problem hiding this comment.
Advance throttling head when notified waiter doesn't acquire
poll_head keeps the throttling head in-place and then suppresses further wakeups while notified_head == vqueue, but the acquire path checks other resources (e.g. lock/user limits) before throttling (resource_manager.rs), so a woken queue can get blocked elsewhere and never call poll_acquire to consume/remove its reservation. In that state this branch returns Pending forever for the same head, queues behind it stop making progress, and reserved throttling capacity is stranded until the head happens to re-enter throttling, which can severely stall scheduling under lock+throttle contention.
Useful? React with 👍 / 👎.
Test Results 5 files - 3 5 suites - 3 1m 37s ⏱️ -18s Results for commit b6bd1d1. ± Comparison against base commit bd7dc3c. This pull request removes 50 and adds 27 tests. Note that renamed tests count towards both. |
Test Results 7 files - 1 7 suites - 1 2m 38s ⏱️ +43s Results for commit b6bd1d1. ± Comparison against base commit bd7dc3c. This pull request removes 7 and adds 4 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
With this change, user-limits acquisition correctly tracks the lifecycle of the invocation state machine on the invoker.
Stack created with Sapling. Best reviewed with ReviewStack.