feat: support fractional desired task counts - #714
Open
WilliamK112 wants to merge 6 commits into
Open
Conversation
Collaborator
|
I see this is committing the same mistakes than #617. I recommend to go there, give it a look, and re-apply the same suggestions here. |
Keep Desired Debug to two decimal places for non-integers, compute default file-scan task counts with true f64 division, and add a union regression for 0.0 leaf hints. Two zero hints still sum before rounding and are then rejected as a zero-task ChildrenIsolatorUnionExec.
Empty union children can sum to Desired(0). That is a valid empty stage, not an internal planning error. Return Desired(0.0) from the dynamic planner so UNION children can sum small fractional hints instead of being masked by 1.0.
v4.0.0 is now released, so the Desired(f64) public break belongs in the next major upgrade guide rather than the historical 3.0.0 notes.
WilliamK112
force-pushed
the
codex/fractional-task-count-562
branch
from
September 8, 2026 19:48
f7930b3 to
d79f887
Compare
Contributor
Author
|
Thanks for pointing me to #617. I went through every maintainer thread there and reapplied the resulting design fixes on top of current
I also rebased onto current Fresh local validation passed: 305 library tests (1 ignored), all 25 network-boundary planner tests, fmt, all-target/all-feature clippy with warnings denied, and whitespace checks. Hosted CI is now running on |
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.
What this changes
TaskCountAnnotation::DesiredandDesiredTaskCountEventResponse::desiredto carryf64, while keepingMaximumas an integer hard cap.usizehandler without adding anf64implementation to the public handler API; fractional test and user handlers are ordinary functions.Desired(0)as a valid empty-stage outcome, including safe zero-task union allocation, traversal, specialization, and execution.Desired(0.0)consumer hint from dynamic planning so sub-one fractional hints are not masked or inflated.The focused union regressions prove both sides of the behavior: fractional child hints are added before resolution, and two zero-valued leaves produce a valid empty stage.
This revision reapplies the maintainer-reviewed suggestions from #617. The four corresponding commits retain Nishchaya Sharma's original authorship.
Closes #562.
Validation
cargo fmt --all -- --checkcargo test --lib— 305 passed, 1 ignoredcargo clippy --all-targets --all-features -- -D warningsgit diff --checkAI assistance disclosure
I used OpenAI Codex to help inspect the planner paths, implement the change, reconcile the prior review suggestions with current
main, and run validation. I reviewed the final diff and test results.