Skip to content

Makes vqueues creation explicit and decouple scheduler cache from state machine#4617

Merged
AhmedSoliman merged 1 commit intomainfrom
pr4617
Apr 22, 2026
Merged

Makes vqueues creation explicit and decouple scheduler cache from state machine#4617
AhmedSoliman merged 1 commit intomainfrom
pr4617

Conversation

Copy link
Copy Markdown

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

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: 943b8e4b96

ℹ️ 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 on lines +25 to +29
#[bilrost(tag(1))]
pub(crate) created_at: MillisSinceEpoch,
/// The time spend in the queue before the first attempt to run. Measured by EMA of time
/// from initial scheduled run time to first "dequeue/start".
#[bilrost(tag(1))]
#[bilrost(tag(2))]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve existing bilrost tags for VQueue statistics

The new created_at field is assigned tag(1) while avg_queue_duration_ms is moved to tag(2), which renumbers an existing serialized field in VQueueStatistics. Because vqueue metadata is persisted and decoded on restart/scan, older on-disk records encoded with the previous tag layout can be misdecoded (or fail decoding when old timestamp fields are interpreted as u32), breaking upgrade compatibility for existing queues. New fields should use new tag numbers without changing prior tags.

Useful? React with 👍 / 👎.

Comment on lines +5309 to +5313
else {
error!("State mutation request was ignored because the vqueue {qid:?} does not exist!");
// todo: When/if we made state mutations rpc-like, we should return the error to the
// user here.
return Ok(());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not drop PatchState when the vqueue is absent

This branch silently ignores external state mutations when no vqueue exists (return Ok(()) after logging). In practice, Command::PatchState for an idle service/object can now be lost entirely instead of being serialized through a newly created vqueue (the previous behavior), causing user-visible state updates to disappear. The handler should create the vqueue (or apply directly / return an explicit error) rather than acknowledging and dropping the mutation.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

Test Results

 5 files   -   2   5 suites   - 2   4m 5s ⏱️ + 1m 18s
35 tests  -  12  35 ✅  -  12  0 💤 ±0  0 ❌ ±0 
62 runs   - 138  62 ✅  - 138  0 💤 ±0  0 ❌ ±0 

Results for commit c3fc617. ± Comparison against base commit 66162ac.

♻️ This comment has been updated with latest results.

@AhmedSoliman AhmedSoliman merged commit c3fc617 into main Apr 22, 2026
60 of 65 checks passed
@AhmedSoliman AhmedSoliman deleted the pr4617 branch April 22, 2026 08:42
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 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.

1 participant