Skip to content

[VQueues] sys_scheduler better blocked_on field(s)#4968

Merged
AhmedSoliman merged 2 commits into
mainfrom
pr4968
Jun 24, 2026
Merged

[VQueues] sys_scheduler better blocked_on field(s)#4968
AhmedSoliman merged 2 commits into
mainfrom
pr4968

Conversation

@AhmedSoliman

@AhmedSoliman AhmedSoliman commented Jun 24, 2026

Copy link
Copy Markdown
Member
  • 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"
  }
]

Stack created with Sapling. Best reviewed with ReviewStack.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/worker-api/src/scheduler_status.rs Outdated
Comment thread crates/limiter/src/lib.rs Outdated
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Test Results

  8 files  ±0    8 suites  ±0   5m 31s ⏱️ +19s
 61 tests ±0   61 ✅ ±0  0 💤 ±0  0 ❌ ±0 
268 runs  ±0  268 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b99c900. ± Comparison against base commit 9447224.

♻️ This comment has been updated with latest results.

@nikrooz nikrooz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank Ahmed, lgtm!

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"
  }
]
```
@AhmedSoliman AhmedSoliman merged commit 7251e51 into main Jun 24, 2026
16 checks passed
@AhmedSoliman AhmedSoliman deleted the pr4968 branch June 24, 2026 17:05
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants