[VQueues] sys_scheduler better blocked_on field(s)#4968
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6c1e9dfb2
ℹ️ 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".
Add a DataFusion system table backed by the vqueue entry status table so operators can inspect EntryStatusHeader fields directly. The table exposes entry and vqueue identifiers, stage/status, scheduling key fields, entry statistics, metadata, retry information, and latest/total WaitStats durations. Add storage API and partition-store scan support for entry status headers, register the table in the query context and table docs, and cover the mapping with a focused DataFusion test. Include an unreleased note for the new user-facing SQL table.
- `blocked_on` now contains a kebab-cased string of the resource name only (e.g. `limit-key-concurrency`).
- Adds `blocked_on_json` field which contains json-encoded details of the blocked resource (including `resource`: `limit-key-concurrency`) to aid with automated parsing of the blocked resource details.
Example:
```
~/w/r/restate ❯❯❯ restate sql --environment=local "select * from sys_scheduler where id='vq_1hUs0qb6BgUS7jetvBb7A1Kqj3UfWTYzLw'" --json | jq
1 rows. Query took 3.192333ms
[
{
"partition_key": 6795114440974114256,
"id": "vq_1hUs0qb6BgUS7jetvBb7A1Kqj3UfWTYzLw",
"num_inbox": 7429,
"status": "blocked",
"head_entry_id": "inv_1hUs0qb6BgUS45EsK1SsuqfhMsn2DJd1Qc",
"blocked_on": "limit-key-concurrency",
"blocked_on_json": "{\"resource\":\"limit-key-concurrency\",\"scope\":\"my-user\",\"limit_key\":\"\",\"blocked_level\":\"scope\",\"blocked_rule\":\"my-user\"}",
"invoker_concurrency_block_duration": "P0D",
"throttling_rules_block_duration": "P0D",
"invoker_throttling_block_duration": "P0D",
"invoker_memory_block_duration": "P0D",
"concurrency_rules_block_duration": "PT1.239S",
"lock_block_duration": "P0D",
"deployment_concurrency_block_duration": "P0D"
}
]
```
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.
blocked_onnow contains a kebab-cased string of the resource name only (e.g.limit-key-concurrency).blocked_on_jsonfield which contains json-encoded details of the blocked resource (includingresource:limit-key-concurrency) to aid with automated parsing of the blocked resource details.Example:
Stack created with Sapling. Best reviewed with ReviewStack.