Unify concurrency request chain identity - #333
Draft
udnay wants to merge 2 commits into
Draft
Conversation
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
udnay
force-pushed
the
codex/unify-enqueue-paths-without-tombstone-conflicts
branch
from
May 30, 2026 15:30
3ea445c to
5d18a17
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.
Motivation
Description
task_id,held_queues,next_limit_index, and serializedlimitstoConcurrencyAction::EnqueueTaskand the FlatBuffer schema, plus codec helpers to encode/decode limit entries.RunAttempton immediate per-limit grants;append_grant_editsnow writes only the holder record and the finalRunAttemptis written by the unified walker once the chain fully resolves.process_grants) to decode the extendedEnqueueTask, validate payload, reserve slots across possibly multiple queues while resuming the chain, emit new request edits when the resumed walk pauses on a later queue, derive per-pass request-counter deltas from walker actions, and roll back all in-memory reservations from the pass on write failure.enqueue_limit_task_at_indexforwards held-queues/next-index to concurrency helpers so queued intents carry the full resume payload; query code prefers decoding the request payload'stask_idwhen available; added a regression testscanner_resumes_paused_chain_with_original_task_id_and_all_holdersand adjusted existing codec/tests to the new payload shape.task_key_start_msconflicts (handled by separatetask_key_start_mswork),RequestTicketfuture scheduling semantics are not fully expanded to carry full chain state, cancel/reimport cleanup for EnqueueTask-held queues requires separate rework, scanner resumption uses durable/default floating capacity rather than inline floating refresh, and queue/index mismatch validations / exhaustive malformed-payload policies are minimal in this change.Testing
git diff --checkandcargo fmt --check— both passed.cargo check --tests/cargo testbut the build script invokesflatc(FlatBuffers compiler) and the environment lacksflatc, causing the build script to panic and tests to be blocked; see build error "failed to run flatc … No such file or directory".scanner_resumes_paused_chain_with_original_task_id_and_all_holders, codec roundtrips for the extendedEnqueueTask), but their execution was blocked by the missingflatcin CI/local environment.cargo fmt/linting performed; no formatting or obvious compile-time syntax issues remain beyond the build-tool dependency failure.Codex Task