-
Notifications
You must be signed in to change notification settings - Fork 641
fix: handling 0 block transfer #3613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Olga Andreeva <[email protected]>
f6b3974
to
062394f
Compare
/ok to test 062394f |
WalkthroughIntroduces early input validation for transfer operations: returning an immediate completion when both sources and targets are empty, and producing a CountMismatch error when their counts differ. Implemented across logical, distributed leader/worker, and local transfer layers without changing function signatures or downstream behavior for valid inputs. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Caller
participant L as Logical::handle_transfer
participant D as DistributedLeaderWorkerResources::handle_transfer
participant T as handle_local_transfer
C->>L: handle_transfer(sources, targets)
alt Empty sources AND targets
L-->>C: Immediate oneshot completion (skip)
else Count mismatch
L-->>C: Error(TransferError::CountMismatch)
else Valid counts
L->>D: handle_transfer(...)
alt Empty sources AND targets
D-->>L: Immediate oneshot completion (skip)
else Count mismatch
D-->>L: Error(CountMismatch)
else Valid counts
D->>T: handle_local_transfer(...)
alt Empty sources AND targets
T-->>D: Immediate oneshot completion (skip)
else Count mismatch
T-->>D: Error(CountMismatch)
else Valid counts
T-->>D: Transfer future/receiver
end
end
D-->>L: Propagate result
L-->>C: Propagate result
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (1)lib/llm/src/block_manager/block/transfer.rs (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
WalkthroughAdds early-empty-input guards to transfer handlers. When Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant TransferHandler as Transfer Handler
participant Guard as Empty-Input Guard
participant Channel as oneshot::channel
Caller->>TransferHandler: handle_transfer(sources, targets)
TransferHandler->>Guard: check sources/targets empty?
alt Empty inputs
Guard-->>TransferHandler: true
TransferHandler->>Channel: create (tx, rx)
TransferHandler->>Channel: tx.send(())
TransferHandler-->>Caller: Ok(rx) (immediately ready)
else Non-empty inputs
Guard-->>TransferHandler: false
TransferHandler->>TransferHandler: proceed with existing transfer logic
TransferHandler-->>Caller: Ok(rx) (completes per prior flow)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
lib/llm/src/block_manager/block/data/logical/distributed_leader_worker.rs
(1 hunks)lib/llm/src/block_manager/block/locality.rs
(1 hunks)lib/llm/src/block_manager/block/transfer.rs
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/llm/src/block_manager/block/transfer.rs (2)
lib/bindings/python/rust/llm/block_manager/vllm/connector/leader.rs (1)
oneshot
(113-113)lib/llm/src/block_manager/distributed/worker.rs (3)
oneshot
(287-287)oneshot
(346-346)oneshot
(349-349)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
- GitHub Check: trtllm (amd64)
- GitHub Check: sglang
- GitHub Check: trtllm (arm64)
- GitHub Check: vllm (arm64)
- GitHub Check: vllm (amd64)
- GitHub Check: tests (lib/bindings/python)
- GitHub Check: clippy (lib/bindings/python)
- GitHub Check: clippy (launch/dynamo-run)
- GitHub Check: tests (launch/dynamo-run)
- GitHub Check: clippy (lib/runtime/examples)
- GitHub Check: tests (.)
- GitHub Check: tests (lib/runtime/examples)
- GitHub Check: clippy (.)
- GitHub Check: Build and Test - dynamo
lib/llm/src/block_manager/block/data/logical/distributed_leader_worker.rs
Outdated
Show resolved
Hide resolved
Signed-off-by: Olga Andreeva <[email protected]>
Signed-off-by: Olga Andreeva <[email protected]>
/ok to test 354fac8 |
Overview:
fixes DIS-825
Details:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit